Skip to content

Commit 116edbf

Browse files
committed
update temp window tests
Signed-off-by: Wenqi Li <[email protected]>
1 parent 3c6ee69 commit 116edbf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_persistentdataset_dist.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
import os
1313
import shutil
14+
import sys
1415
import tempfile
1516
import unittest
1617

@@ -33,9 +34,14 @@ def __call__(self, data):
3334

3435
class TestDistDataset(DistTestCase):
3536
def setUp(self):
37+
self.original_tmp = os.environ.get("TMPDIR", "")
38+
if sys.platform == "win32": # workaround for project-monai/monai#3613
39+
os.environ["TMPDIR"] = "D:\\temp_monai"
3640
self.tempdir = tempfile.mkdtemp()
3741

3842
def tearDown(self):
43+
if sys.platform == "win32":
44+
os.environ["TMPDIR"] = self.original_tmp
3945
shutil.rmtree(self.tempdir)
4046

4147
@DistCall(nnodes=1, nproc_per_node=2)

0 commit comments

Comments
 (0)