Skip to content

Commit ec4915f

Browse files
author
Ari Hartikainen
committed
skip write-fail test on Windows
1 parent bfb9e4c commit ec4915f

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

test/test_sample.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -646,12 +646,11 @@ def test_save_csv(self):
646646
with self.assertRaisesRegex(ValueError, 'cannot access csv file'):
647647
bern_fit.save_csvfiles(dir=DATAFILES_PATH)
648648

649-
with self.assertRaisesRegex(
650-
Exception, 'cannot save to path: '
651-
):
652-
dir = tempfile.mkdtemp(dir=_TMPDIR)
653-
os.chmod(dir, stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH)
654-
bern_fit.save_csvfiles(dir=dir)
649+
if platform.system() != "Windows":
650+
with self.assertRaisesRegex(Exception, 'cannot save to path: '):
651+
dir = tempfile.mkdtemp(dir=_TMPDIR)
652+
os.chmod(dir, stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH)
653+
bern_fit.save_csvfiles(dir=dir)
655654

656655
def test_diagnose_divergences(self):
657656
exe = os.path.join(DATAFILES_PATH, 'bernoulli' + EXTENSION)

0 commit comments

Comments
 (0)