Added some smoketests. CURA-3297

This commit is contained in:
Jack Ha 2017-04-25 11:18:55 +02:00
parent ed23e6f5b2
commit 74059a82a5
2 changed files with 13 additions and 1 deletions

2
tests/Settings/TestCuraContainerRegistry.py Normal file → Executable file
View file

@ -75,4 +75,4 @@ def test_loadLegacyFileRenamed(container_registry):
assert not os.path.isfile(temp_file) assert not os.path.isfile(temp_file)
new_filename = os.path.splitext(os.path.splitext(temp_file)[0])[0] + ".global.cfg" new_filename = os.path.splitext(os.path.splitext(temp_file)[0])[0] + ".global.cfg"
assert os.path.isfile(new_filename) assert os.path.isfile(new_filename)

12
tests/Settings/TestGlobalStack.py Normal file → Executable file
View file

@ -544,3 +544,15 @@ def test_setVariantByIdExists(global_stack, container_registry):
def test_setVariantByIdDoesntExist(global_stack): def test_setVariantByIdDoesntExist(global_stack):
with pytest.raises(InvalidContainerError): with pytest.raises(InvalidContainerError):
global_stack.setVariantById("some_variant") #Container registry is empty now. global_stack.setVariantById("some_variant") #Container registry is empty now.
## Smoke test for findDefaultVariant
def test_smoke_findDefaultVariant(global_stack):
global_stack.findDefaultVariant()
## Smoke test for findDefaultMaterial
def test_smoke_findDefaultMaterial(global_stack):
global_stack.findDefaultMaterial()
## Smoke test for findDefaultQuality
def test_smoke_findDefaultQuality(global_stack):
global_stack.findDefaultQuality()