Skip to content

Commit eab0481

Browse files
committed
update comp
1 parent 8af0dbd commit eab0481

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

calphy/composition_transformation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ def write_structure(self, outfilename):
551551
atom_idx += 1
552552
if atom_idx >= len(self.pyscal_structure.atoms.types):
553553
break
554-
554+
555555
# Verify all atoms were updated
556556
expected_atoms = len(self.pyscal_structure.atoms.types)
557557
if atom_idx != expected_atoms:

tests/test_composition_transformation_bug.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,13 @@ def test_composition_transformation_single_type_file(mg_structure_file):
204204

205205
# Read and verify the written structure
206206
import re
207+
207208
with open(output_structure, "r") as f:
208209
content = f.read()
209210
# 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"
211+
assert re.search(
212+
r"2048\s+atoms", content
213+
), "Expected '2048 atoms' in output file"
211214

212215
# Verify entropy contribution calculation
213216
entropy = comp.entropy_contribution

0 commit comments

Comments
 (0)