Skip to content

Commit 4cbf8ba

Browse files
committed
add cleanup pre testing
1 parent 778ead3 commit 4cbf8ba

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

archetypal/umi_template.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,8 @@ def replacement():
796796
for component in components:
797797
if component.__class__.__name__ + "s" in inclusion:
798798
equivalent_component = component.get_unique()
799-
component.replace_me_with(equivalent_component)
799+
if equivalent_component.id != component.id:
800+
component.replace_me_with(equivalent_component)
800801
replacement()
801802
self.update_components_list()
802803

tests/test_umi.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class TestUmiTemplate:
3232

3333
@pytest.fixture(autouse=True)
3434
def cleanup(self):
35+
UmiTemplateLibrary._clear_class_memory()
3536
yield
3637
UmiTemplateLibrary._clear_class_memory()
3738

0 commit comments

Comments
 (0)