Repository navigation
test(8-k): say the #1589 fixture keeps the script tag sec.gov adds (#1589) - #1616
Merged
Merged
Conversation
… adds (dgunning#1589) The fixture docstring said the saved 8-K page is byte for byte what the SEC served, which is true, but the file also carries the bot-defense script tag www.sec.gov adds to every response (its src changes per request), which is not part of the filing. The docstring now says so, and why the test is unaffected: the HTML parser removes script elements before building the text, and the assertions concern the filed item headings and text. Docstring only; the fixture and the assertions are unchanged. Follow-up to the review on dgunning#1590. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 of 7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
The regression test for #1589 now says, in its fixture docstring, that the saved 8-K page keeps the bot-defense
<script>tag that www.sec.gov adds to every response, and why the test is unaffected. Documentation only: the fixture, the assertions and the library are unchanged. Follow-up to the review on #1590.Refs #1589
Verification
tests/issues/regression/, and its docstring links the issue or beadNonechangelog.d/<id>.<section>.mdfragment, not an edit toCHANGELOG.mdThe change clarifies the fixture docstring of the existing #1589 regression test, whose assertions and fixture are untouched. A changelog fragment,
changelog.d/1589.changed.md, records that clarification. The other unchecked boxes describe work this PR does not add.6.0
docs/upgrade/6.0.mdsays what users see now and what to do insteadCI fails a PR that stages a 6.0 change without touching the upgrade guide. If it flags something that isn't a 6.0 change, add the
no-upgrade-guidelabel, say why here, and re-run the job.AI assistance
Working context (optional)
8kSYQH.htm(0000710782-24-000005), so the docstring's "byte for byte" stays true and nothing in the fixture is edited by hand.<script>element, at the end of the body. The test builds its text withHTMLParser(ParserConfig(form="8-K")), whose preprocessor removes script and style elements before parsing (edgar/documents/processors/preprocessor.py:120and:163-166). The assertions concern the filed item headings and text.pytest tests/issues/regression/test_issue_1589.py(12 passed),ruff checkon the file (clean), and the offline suitepytest -m fast -n auto(42,606 passed, 27 failed). The unchanged base, main at 4f11882, gives the same 42,606 passed and 27 failed on this machine (Windows 11, Python 3.14.4), and the base's 27 failing tests fail the same way on this branch when run on their own, except one that passes alone. They are text-output baselines and other recorded-output checks, none of which reads this docstring or the fragment. The changelog check and the upgrade-guide gate pass on the final commit (tests/meta/test_assemble_changelog.py,tests/meta/test_upgrade_guide_gate.py).