-
Notifications
You must be signed in to change notification settings - Fork 1
✨ Introduce get_all_ebd_keys
#4
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ | |
|
|
||
| from ebddocx2table.docxtableconverter import DocxTableConverter | ||
|
|
||
| from . import get_document, get_ebd_docx_table | ||
| from . import get_all_ebd_keys, get_document, get_ebd_docx_table | ||
| from .examples import table_e0003 | ||
|
|
||
|
|
||
|
|
@@ -18,6 +18,15 @@ def test_can_read_document(self, datafiles, filename: str): | |
| actual = get_document(datafiles, filename) | ||
| assert actual is not None | ||
|
|
||
| @pytest.mark.datafiles("unittests/test_data/ebd20221128.docx") | ||
| @pytest.mark.parametrize( | ||
| "filename,expected_length", | ||
| [pytest.param("ebd20221128.docx", 241)], | ||
| ) | ||
| def test_get_ebd_keys(self, datafiles, filename: str, expected_length: int): | ||
| actual = get_all_ebd_keys(datafiles, filename) | ||
| assert len(actual) == expected_length # arbitrary, didn't check if these are really _all_ the keys | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hab das mal mit dem Inhaltsverzeichnis grob überschlagen und komme auf ~260 E's. Kommt also ungefähr hin. |
||
|
|
||
| @pytest.mark.datafiles("unittests/test_data/ebd20221128.docx") | ||
| @pytest.mark.parametrize( | ||
| "filename, ebd_key", | ||
|
|
||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gibt es einen Grund, warum vorher auch
Smöglich war und jetzt nicht mehr? ^^Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weil ich beim ersten Mal fälschlicherweise auch die codelisten gematched habe die mit S(trom) oder G(as) beginnen und im gleichen Dokument rumschwirren.
Nur E ist EBD.