Skip to content
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

Add unit tests #44

Open
iansan5653 opened this issue Nov 3, 2021 · 6 comments
Open

Add unit tests #44

iansan5653 opened this issue Nov 3, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@iansan5653
Copy link
Owner

iansan5653 commented Nov 3, 2021

This is critically important - there is no automated testing. We need unit and/or end-to-end testing examining as many scenarios as possible. (edit: we do have E2E testing now but could still use some unit tests).

@iansan5653 iansan5653 added the enhancement New feature or request label Nov 3, 2021
@iansan5653 iansan5653 assigned iansan5653 and unassigned iansan5653 Nov 3, 2021
@N1m6
Copy link
Contributor

N1m6 commented Nov 17, 2021

Hello. It's a common practice to place test in the same directory as core code package, i.e. in the root repo. So test is not a part of main package. When writing tests one needs to import functionality from the main package. The problem that your main package open-mcr/code conflicts with this python module when imported as import code. It would be very helpful for this issue, and probably for some future ones, to refactor open-mcr/code to valid python identifier like open-mcr/open_mcr, so core package may be safely imported as import open_mcr.

@iansan5653
Copy link
Owner Author

That's a great point. Another option could be to rename code to src - I've seen that pattern in a couple of projects as well.

@N1m6
Copy link
Contributor

N1m6 commented Dec 1, 2021

I'm ready to begin writing test with pytest module, but renaming source package name came out to be vital for running pytest. Neither with tests placed in a sibling package nor with test placed in a child package like open-mcr/code/test it is possible to ignore conflict with python's own code.
Do you want me to make a PR to release/1.2.0 for a change of this kind?

@iansan5653
Copy link
Owner Author

Hi, sorry for the delay in responding. I think we should rename the code package to src. I just released 1.2.0 but you can just open pull requests to master with any changes.

@iansan5653 iansan5653 changed the title Add tests Add unit tests Dec 12, 2021
@N1m6
Copy link
Contributor

N1m6 commented Dec 18, 2021

Hello. There are big changes in my life recently. I may be absent for a couple of months. I will be ready to work on this when i get everything sorted out.

@iansan5653
Copy link
Owner Author

No worries! I may make some progress on this particular task but there will always be more to work on if you want to in the future. Thanks so much for the great work so far, and I hope everything works out well for you.

@iansan5653 iansan5653 added enhancement New feature or request and removed enhancement New feature or request labels May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants