tests: fix model fromfile rmdir test
import unittest
import tempfile
+import os
from os.path import join
-from os import rmdir
from numpy import logaddexp
import cpmpy as cp
@@ -16,7 +16,7 @@ class TestModel(unittest.TestCase):
return super().setUp()
def tearDown(self) -> None:
- rmdir(self.tempdir)
+ os.rmdir(self.tempdir)
return super().tearDown()
def test_ndarray(self):
@@ -39,3 +39,4 @@ class TestModel(unittest.TestCase):
loaded = cp.Model.from_file(fname)
self.assertTrue(loaded.solve())
+ os.remove(fname)
