mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-13 21:43:16 +08:00
Clean up temporary files after test
If the test fails to remove the temporary file, this cleans up after it. Contributes to issue CURA-3497.
This commit is contained in:
parent
9ce621a02d
commit
f579b5f304
@ -18,6 +18,12 @@ import UM.Settings.ContainerStack #Setting the container registry here properly.
|
||||
def container_registry():
|
||||
return CuraContainerRegistry()
|
||||
|
||||
def teardown():
|
||||
#If the temporary file for the legacy file rename test still exists, remove it.
|
||||
temporary_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), "stacks", "temporary.stack.cfg")
|
||||
if os.path.isfile(temporary_file):
|
||||
os.remove(temporary_file)
|
||||
|
||||
## Tests whether loading gives objects of the correct type.
|
||||
@pytest.mark.parametrize("filename, output_class", [
|
||||
("ExtruderLegacy.stack.cfg", ExtruderStack),
|
||||
|
Loading…
x
Reference in New Issue
Block a user