-
Notifications
You must be signed in to change notification settings - Fork 360
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
[WIP] optimize code and add tests #22
base: main
Are you sure you want to change the base?
[WIP] optimize code and add tests #22
Conversation
Since it's WIP, it'd be great to use the pytest, the project intends to use pytest for testing @krishna-parajuli , there is now pytest config as well. |
542ff56
to
74ffb89
Compare
@krishna-parajuli If possible, can you create a PR for the test configuration so that it can be merged and used by others? |
@krishna-parajuli thank you for taking lead on writing tests but the changes so far seem to be very detailed unit tests. Can we focus on writing tests that test the functionality first? Please see my proposal in this comment - #11 (comment) Please create a test framework that bootstraps running the code and makes the output available to test methods. We can then divide writing specific test cases per each requirement among other devs. cc: @horrormyth |
I agree with @sapradhan here, with a strong note that detailed unit tests for each function are necessary, the main reason being that these could be used elsewhere. We can argue that reusability is minimal in this project, but still, it would be good to go in that direction. Anyhow, for brevity, those functions could then be battle-tested from the main function that actually calls them with functionality/cases in mind. One advantage of this is that we don't necessarily need to provide expected fixtures for each of the functions; basically, whoever creates one writes the tests for it. The test sets of main/whatever_we_call should then cover all the intended test cases with the expected output that @sumanashrestha has mentioned and/or any corner cases. With that being said, and TLDR, it would be good to have the expected fixtures ready. |
@horrormyth @ashiishme @krishna-parajuli @sapradhan I have raised a PR that tests the functionality of the program. here #89.
Sample automated testing here. |
No description provided.