Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write to file and file-like objects #148

Merged
merged 11 commits into from
Jan 25, 2025
Merged

Write to file and file-like objects #148

merged 11 commits into from
Jan 25, 2025

Conversation

EnricoMi
Copy link
Collaborator

@EnricoMi EnricoMi commented Jan 14, 2025

Method fromfile already supports reading file objects, file-like objects and urls. This is now tested and documented.

Similarly, methods write_xml and write now support writing to file objects and file-like objects. This makes to_console argument redundant.

Asserts the actual written XML content.

@EnricoMi EnricoMi force-pushed the write-file branch 5 times, most recently from 6f855ce to c08ea29 Compare January 14, 2025 16:52
Copy link

github-actions bot commented Jan 14, 2025

Test Results

  4 files  ± 0    4 suites  ±0   1s ⏱️ -1s
101 tests + 5  101 ✅ + 5  0 💤 ±0  0 ❌ ±0 
404 runs  +20  395 ✅ +17  9 💤 +3  0 ❌ ±0 

Results for commit 1e246e4. ± Comparison against base commit 260ef3d.

This pull request removes 6 and adds 11 tests. Note that renamed tests count towards both.
tests.test_fromfile ‑ test_read_written_xml
tests.test_fromfile ‑ test_write
tests.test_fromfile ‑ test_write_noarg
tests.test_fromfile ‑ test_write_nonascii
tests.test_fromfile ‑ test_write_pretty
tests.test_fromfile ‑ test_write_xml_without_testsuite_tag
tests.test_fromfile ‑ test_fromfile_file_obj
tests.test_fromfile ‑ test_fromfile_filelike_obj
tests.test_fromfile ‑ test_fromfile_url
tests.test_write ‑ test_read_written_xml
tests.test_write ‑ test_write
tests.test_write ‑ test_write_file_obj
tests.test_write ‑ test_write_filelike_obj
tests.test_write ‑ test_write_noarg
tests.test_write ‑ test_write_nonascii
tests.test_write ‑ test_write_pretty
…

♻️ This comment has been updated with latest results.

@weiwei weiwei merged commit 5f8ee50 into master Jan 25, 2025
7 of 8 checks passed
@weiwei weiwei deleted the write-file branch January 25, 2025 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants