Skip to content

Commit 8af0dbd

Browse files
committed
fix issue with test assertion
1 parent 02ce52e commit 8af0dbd

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎tests/test_composition_transformation_bug.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,11 @@ def test_composition_transformation_single_type_file(mg_structure_file):
203203
assert os.path.exists(output_structure)
204204

205205
# Read and verify the written structure
206+
import re
206207
with open(output_structure, "r") as f:
207208
content = f.read()
208-
assert "2048 atoms" in content
209+
# Check for "2048 atoms" with flexible whitespace (space or tab)
210+
assert re.search(r"2048\s+atoms", content), "Expected '2048 atoms' in output file"
209211

210212
# Verify entropy contribution calculation
211213
entropy = comp.entropy_contribution

0 commit comments

Comments
 (0)