Commit 29fc3177 authored by Stephen Thompson's avatar Stephen Thompson

Issue #89 added sort to model list, and updated test order

parent d37310d0
Pipeline #3775 passed with stages
in 6 minutes and 35 seconds
......@@ -69,6 +69,7 @@ class VTKSurfaceModelDirectoryLoader:
# If its not valid I want the Exception raised.
LOGGER.info("Loading models from %s", directory_name)
self.files = os.listdir(directory_name)
self.files.sort()
# Loop through each file, trying to load it.
counter = 0
......
......@@ -77,7 +77,7 @@ def test_valid_dir_with_colours_from_file_from_issue_4():
def test_consistent_model_order_issue_89():
dir_name = 'tests/data/models/Liver'
loader = VTKSurfaceModelDirectoryLoader(dir_name)
assert loader.models[0].get_name() == "gastric_vein.vtk"
assert loader.models[6].get_name() == "arteries.vtk"
assert loader.models[8].get_name() == "liver.vtk"
assert loader.models[0].get_name() == "arteries.vtk"
assert loader.models[3].get_name() == "gastric_vein.vtk"
assert loader.models[5].get_name() == "liver.vtk"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment