<#21736 Using python_function to find pytest tests...
# github-notifications
c
#21736 Using python_function to find pytest tests New discussion created by martvald Hi, I'm struggling with having my test pass. I have been using a pytest.ini: [pytest] python_files = *.py python_functions = test_* _test_* I would then normally run something like:
pytest my_package
Which would test all python files in
my_package
starting with "test_" or "_test_". I have not been able to duplicate this behavior in pants. It does find and run with the same pytest.ini file. This is my current BUILD:
Copy code
python_requirements(name="reqs")

python_sources(name="root")
python_sources(name="my_package", sources=["my_package/**/*.py"])

python_tests(
    name="my_package_test",
    sources=["my_package/**/*.py"],
    dependencies=[":my_package"],
)
Hopefully this is a quick fix I haven't been able to find. pantsbuild/pants