Skip to content

Testing python submodules without dying in the attempt

Notifications You must be signed in to change notification settings

WilliamMolina/python_testing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Testing python submodules

  • Create virtual environment
  • Install dependencies
  • run "pytest"

Notes

The most important part of this example is the "conftest.py" file. When pytest discovers a conftest.py, it modifies sys.path so it can import stuff from the conftest module. So, since now an empty conftest.py is found in rootdir, pytest will be forced to append it to sys.path. If you remove this file, you can check that tests don't run correctly.

About

Testing python submodules without dying in the attempt

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages