Skip to content

[Testing] docker-compose run --rm manage test users runs zero tests (PyTest not used as TestRunner) #107

Closed
@chris48s

Description

@chris48s

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:

- name: Test Users
run: docker-compose run --rm manage test users
if: always()

$ docker-compose run --rm manage test users
Starting db ... done
System check identified no issues (0 silenced).

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK

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?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions