Skip to content

Commit fd78a48

Browse files
chore(tests): mark sample_file.txt as text with LF line endings (openai#3879)
- [x] I understand that this repository is auto-generated and my pull request may not be merged ## Changes being requested Add a `.gitattributes` marking `tests/sample_file.txt -text`. A default Windows checkout (`core.autocrlf=true`, the setting Git for Windows recommends) converts that fixture to CRLF because nothing tells Git it is a fixed byte fixture. `test_base64_file_input` base64-encodes the file and compares against a fixed LF-based digest, so it fails out of the box on a fresh Windows clone: AssertionError: assert '...IHdvcmxkIQ0K' == '...IHdvcmxkIQo=' With the attribute, `git ls-files --eol tests/sample_file.txt` shows `i/lf w/lf attr/-text` and `pytest tests/test_transform.py -k base64_file_input` goes from 2 failed to 2 passed on the same clone; the rest of `tests/test_transform.py` (60 tests) stays green. The fixture's bytes in the repository are unchanged. ## Additional context & links The file is not generated code, so nothing in the SDK regeneration touches it. Same shape as other repos' fixture handling for byte-exact test inputs. --------- Co-authored-by: Marcus Wood <marcuswood@openai.com>
1 parent 5559bdb commit fd78a48

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎tests/.gitattributes‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sample_file.txt -text

0 commit comments

Comments
 (0)