Fix: test_auth.py line-prefix corruption & _resolve_output_path default-dir bug #3
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problems
test_auth.py corrupted: Every line had a duplicated line-number prefix (e.g.,
1| 1|actual content), likely from a bug in the previous coder's write_file where read_file output prefixes were written verbatim. This causedIndentationErrorpreventing all test collection._resolve_output_path default-dir bug: When
output=None(default), if~/cantaloupe-exports/directory doesn't exist,Path.is_dir()returns False and the function treats the path as a file — losing the timestamp and writing to a bare~/cantaloupe-exportsfile instead of~/cantaloupe-exports/Machine List_TIMESTAMP.xlsx.Fixes
re.sub(r'^ *\d+\|', '', content, flags=re.MULTILINE)to strip prefixoutput is Noneto the directory-branch condition so default path always gets timestamped filenameCommits
b5ae89a— fix(download): fix _resolve_output_path default dir, add 20 download testsTest Results
47 tests passing (27 auth + 20 download)