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
Convert unittest to pytests #274
Conversation
Merge new version into fork
…uckNrOne-Issue143
DuckNrOne issue 143 small changes
I'll make some time next week to review and merge this. Sorry for the long wait. |
I'm not quite sure if this is the newest version of the conversion because the whole discussion took place in the other PR. |
I think that were all the blemishes. Could you 1) rebase it such that my merge typoes get squashed? If you want to, feel free to also treat my cleanup commits as squashes or fixups. 2) go over it one last time to make sure I didn't miss anything? |
d7f37fb
to
f874839
Compare
I squashed the typos and cleanups together. In my opinion, it's the cleanest possibility ;) |
I took a look over the tests and I have some questions/ideas :D First of all: A testcase was commented out in test_general. I would convert the function into pytest-code and mark it as skipped. In addition, many lines of code were commented out, because they are irrelevant. For example in test_general and test_auto_fit. Either I remove such irrelevant lines in this PR or in another PR (or never...maybe they are relevant). In addition, I have found a rather long line in test_argument, but I can not think of an elegant linebreak. |
Sure. It would be good to later have a look at the comment ("redudant with test_error_analytical?") and reevaluate whether we need the test. Otherwise we should just remove it completely.
Leave them for now. Once we start really redoing the tests pytest-style they should probably be just removed.
Leave it for now. @tBuLi doesn't really have a problem with long lines (much less than me). At some point I need to talk to him about pep8 and pylint though... This PR looks good to me as is. I'll give @tBuLi until noon tomorrow to intervene before I merge it :) |
Thanks for all the work, I merged it :) Going forward with the whole pytest parametrize idea: pick a test file, and convert/adapt that. Make a PR, get that merged, then continue to the next. So long as the coverage doesn't drop/change you get a lot of liberties in rewriting/removing/adding tests, as far as I'm concerned. Also feel free to separate specific test cases (usually related to now-closed issues) to a separate file. I think |
This PR includes the first stage of test-conversion.
At the moment it's a pure translation of unittest to pytest