Project structure for a pytest project

project/
├── src/
│   ├── app.py
│   ├── ...
├── tests/
│   ├── conftest.py
│   ├── test_login.py
│   ├── test_register.py
│   ├── ...
├── pytest.ini
├── requirements.txt
└── README.md
  • src/: directory for application code.

  • tests/: directory for test code.

  • conftest.py: file containing fixtures and hooks used across all tests.

  • test_login.py, test_register.py, etc.: test files containing test functions.

  • pytest.ini: configuration file for pytest.

  • requirements.txt: file containing project dependencies.

  • README.md: file containing project documentation.

Last updated