-
-
Notifications
You must be signed in to change notification settings - Fork 25
[Testing] docker-compose run --rm manage test users runs zero tests (PyTest not used as TestRunner) #107
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
Comments
@chris48s - thank you for the through look over - it is much appreciated. To be honest, we "ended up here" because we haven't really been focusing on fully detailed tests through PyTest, but rather MVP functionality, and very very basic unittests, using We've been using Cookiecutters default setup - and the Pytest tests you see in users are the default "example" tests supplied by that framework (as is the custom users module, which we have yet to extend). We're tipping off In the last big tags changes + file re-org, it appears our I've been taking a pause since then, so just now noticing. I'd like to restore Thoughts? The first step is replacing We'll also want to discuss maybe testing through postman and postman collections as well. |
Correction. The Playing with it..but will probably give up in a bit, since its late for me. |
OK. I hadn't clocked that
Agreed. Lets get to a stage where the test suite you already have actually works.
Personally I'd say the second step is to get all your tests running with one test runner. If you start getting into evaluating test data factories first, you'll want to write more test code or tweak your existing tests to make that decision and that will be more annoying with your test suite split across 2 runners. It also means if that takes a while, at least contributors can lean on the existing test suite relatively easily while you're making those decisions. Given |
The
users
app does have some tests defined in it: https://github.com/codebuddies/backend/tree/master/project/users/tests but they're not actually being run in CI:backend/.github/workflows/test.yml
Lines 24 to 26 in 1607b81
The main problem here is that there is a mix of pytest tests and django tests. Django's
unittest.discover
(which is what is being used in CI) isn't picking up the pytest ones.In general, the project should standardize on one test runner for discovery and that is best done sooner rather than later. I'm happy to help out solving this one way or the other, but is anyone able to give a quick summary of how you ended up here and where you're trying to get to so I know which direction to go in?
The text was updated successfully, but these errors were encountered: