-
Notifications
You must be signed in to change notification settings - Fork 5
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
Starting to create more tests #43
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #43 +/- ##
===========================================
+ Coverage 28.70% 55.23% +26.52%
===========================================
Files 2 3 +1
Lines 108 172 +64
===========================================
+ Hits 31 95 +64
Misses 77 77
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I see you are doing some testing lately. |
Hi @florian-gandon ! Thanks for the input ! # FEATURE: text normalisation before further processing
def test_normalise(self):
# SCENARIO: I want to normalise a string of text with defaults settings
# GIVEN the following string
text = " Hello, Mr. 𓀁, how are §§ you; doing?"
# WHEN I apply normalisation
result = superstyl.preproc.tuyau.normalise(text)
# THEN I expect the following output in lower case and without punctuation and symbols
expected_default = "hello mr how are you doing"
self.assertEqual(result, expected_default) Or do I miss something ? |
Yes, for instance.
(or optionally without comments as there is only one line for each part) |
Nice ! I'm not using a lot of class oriented stuff right now, but for the tests, I'm using a class by feature of the main entry points (so a class for data loading, a class for training, etc.), in which I have a test function definition for each function of the source library. |
Merging and closing this one as I need to implement and test a completely new function, but please give feedback whenever you want, it is much appreciated :) |
No description provided.