Skip to content

Commit 7fdcfda

Browse files
committed
fix unicode assertions in tests
Signed-off-by: phernandez <paul@basicmachines.co>
1 parent af835c3 commit 7fdcfda

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

test-int/cli/test_project_commands_integration.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def test_project_list(app_config, test_project, config_manager):
1919
print(f"Exception: {result.exception}")
2020
assert result.exit_code == 0
2121
assert "test-project" in result.stdout
22-
assert "" in result.stdout # default marker
22+
assert "[X]" in result.stdout # default marker
2323

2424

2525
def test_project_info(app_config, test_project, config_manager):
@@ -114,8 +114,8 @@ def test_project_set_default(app_config, config_manager):
114114
# Verify in list
115115
result = runner.invoke(app, ["project", "list"])
116116
assert result.exit_code == 0
117-
# The new project should have the checkmark now
117+
# The new project should have the [X] marker now
118118
lines = result.stdout.split("\n")
119119
for line in lines:
120120
if "another-project" in line:
121-
assert "" in line
121+
assert "[X]" in line

tests/schemas/test_schemas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ def test_parse_timeframe_other_formats(self):
348348
result_1d = parse_timeframe("1d")
349349
expected_1d = now - timedelta(days=1)
350350
diff = abs((result_1d - expected_1d).total_seconds())
351-
assert diff < 60 # Within 1 minute tolerance
351+
assert diff < 3600 # Within 1 hour tolerance (accounts for DST transitions)
352352
assert result_1d.tzinfo is not None
353353

354354
# Test yesterday - should be yesterday at same time

tests/sync/test_sync_service_incremental.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,13 @@ async def test_force_full_bypasses_watermark_optimization(
179179
# Modify a file WITHOUT updating mtime (simulates external tool like rclone)
180180
# We set mtime to be BEFORE the watermark to ensure incremental scan won't detect it
181181
file_path = project_dir / "file1.md"
182-
original_stat = file_path.stat()
182+
file_path.stat()
183183
await create_test_file(file_path, "# File 1\nModified by external tool")
184184

185185
# Set mtime to be before the watermark (use time from before first sync)
186186
# This simulates rclone bisync which may preserve original timestamps
187187
import os
188+
188189
old_time = initial_timestamp - 10 # 10 seconds before watermark
189190
os.utime(file_path, (old_time, old_time))
190191

0 commit comments

Comments
 (0)