Skip to content

Commit 8d7be53

Browse files
committed
fix: use path.name in transaction repr tests for Windows
Same fix as table repr test - use path.name to avoid Windows path separator differences between str(path) and repr(path).
1 parent 84af48b commit 8d7be53

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/unit/test_transaction.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,8 @@ def test_repr_active_transaction(self, tmp_path: "Path") -> None:
794794
try:
795795
result = repr(tx)
796796
assert "Transaction(" in result
797-
assert str(table_path) in result
797+
# Use name to avoid Windows path separator issues
798+
assert table_path.name in result
798799
assert "key='id'" in result
799800
assert "active" in result
800801
finally:
@@ -809,7 +810,8 @@ def test_repr_finalized_transaction(self, tmp_path: "Path") -> None:
809810

810811
result = repr(tx)
811812
assert "Transaction(" in result
812-
assert str(table_path) in result
813+
# Use name to avoid Windows path separator issues
814+
assert table_path.name in result
813815
assert "key='id'" in result
814816
assert "finalized" in result
815817

0 commit comments

Comments
 (0)