Skip to content

Commit

Permalink
Add direct batch test of sgml
Browse files Browse the repository at this point in the history
  • Loading branch information
dgunning committed Jan 29, 2025
1 parent d903c4d commit 2eb1e61
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/batch/batch_filings.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def sample_and_test_filings(years, sample_size):
filing.markdown()
filing.obj()
filing.xbrl()
filing.sgml().filing_summary
print(filing.header)
except Exception as e:
print(f"Failed to get text for {filing}")
Expand Down
9 changes: 8 additions & 1 deletion tests/test_sgml.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,4 +265,11 @@ def test_get_sgml_from_filing_when_no_local_storage_exists(monkeypatch):
def test_get_filing_summary():
sgml: FilingSGML = FilingSGML.from_source("data/sgml/0000320193-24-000123.txt")
summary = sgml.filing_summary
assert summary
assert summary

def test_unusual_sgml_format():
filing = Filing(form='NPORT-P', filing_date='2024-08-14', company='RMB INVESTORS TRUST', cik=30126, accession_no='0001145549-24-048310')
sgml = filing.sgml()
assert sgml
sgml = FilingSGML.from_source(filing.text_url)
assert sgml

0 comments on commit 2eb1e61

Please sign in to comment.