diff --git a/aidge_core/unit_tests/test_export.py b/aidge_core/unit_tests/test_export.py index a0929eb96e02f65855eb60891899b8403cf43d2e..b60304365d512d5d08abd8572cf3fae6fcce887f 100644 --- a/aidge_core/unit_tests/test_export.py +++ b/aidge_core/unit_tests/test_export.py @@ -41,6 +41,10 @@ def initFiller(model): pass def clean_dir(dir : pathlib.Path) -> None: + if not os.path.isdir(dir): + print(f"Error : directory {dir} doesn't exist.") + return + for filename in os.listdir(dir): file_path = os.path.join(dir, filename) try: @@ -83,7 +87,6 @@ class test_export(unittest.TestCase): # Export model aidge_core.export(self.EXPORT_PATH, model) - clean_dir(self.EXPORT_PATH / "build") self.assertTrue( self.EXPORT_PATH.is_dir(), "Export folder has not been generated"