Conversation
tests/test_identifier.py
Outdated
|
|
||
| for entry in database: | ||
| entry_name = entry["Name"] | ||
| for word in entry_name.split(" "): |
There was a problem hiding this comment.
Yep, got used to make it explicit due to a previous project :p Fixed it
tests/test_identifier.py
Outdated
| def test_name_capitalization(): | ||
| database = load_regexes() | ||
|
|
||
| for entry in database: | ||
| entry_name = entry["Name"] | ||
| for word in entry_name.split(" "): |
There was a problem hiding this comment.
Can we make a new test file test_regex_formating and move this test in there?
Also, can we move all other tests which test the format of that file? Like the rarity sorting 😄
tests/test_identifier.py
Outdated
| if cleaned_word in ["a", "of", "etc"]: | ||
| continue | ||
|
|
||
| assert word.title() == word |
There was a problem hiding this comment.
When this test fails, can we please explain why it failed? There's an example of this with the ^ $ regex test which tells you exactly why it failed :)
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #206 +/- ##
==========================================
+ Coverage 92.21% 92.27% +0.06%
==========================================
Files 13 14 +1
Lines 1631 1644 +13
==========================================
+ Hits 1504 1517 +13
Misses 127 127 ☔ View full report in Codecov by Sentry. |
I just moved |
Make a new test file for testing the tests file? 👀 |
That would be too much files, maybe rename |
That's only 5 test files? If we want, we could put them into folders, no? |
|
By the way, I guess we should also move |
I think |
|
Moving this special tests out of regular regex tests file seems like a good idea to me. Tho I don't know what to name the file or if more files would be better? |
I'll just move this one before merge |
|
And while we are discussing tests files, I'm not sure about the usefulness of some tests in |
|
When #202 gets merged with examples alongside in the database, we could maybe take those, write it to a file and run the file against pyWhat to verify that regex works if match is put in a file? But we also need to test boundaryless, so matches in between of something else.. |
|
Let's discuss this on #199 |
Prerequisites
Why do we need this pull request?
Regex names capitalization are now tested.
Some words are ignored:
What GitHub issues does this fix?
Tell me what you think about the test and if you might have any false positive in my mind