Browse Source

Don't let a test remove files from hard disk

This test does not test the removing of these files. In general, to make a test run fast, it should not perform any disk operations.

Contributes to issue CURA-3497.
Ghostkeeper 8 years ago
parent
commit
007f764471
1 changed files with 2 additions and 1 deletions
  1. 2 1
      tests/Settings/TestCuraContainerRegistry.py

+ 2 - 1
tests/Settings/TestCuraContainerRegistry.py

@@ -41,7 +41,8 @@ def test_loadTypes(filename, output_class, container_registry):
         return unittest.mock.MagicMock()
 
     with unittest.mock.patch("cura.Settings.GlobalStack.GlobalStack.findContainer", findContainer):
-        container_registry.load()
+        with unittest.mock.patch("os.remove"):
+            container_registry.load()
 
     #Check whether the resulting type was correct.
     stack_id = filename.split(".")[0]