Hi there. I'm looking at using Pants for a monorep...
# general
f
Hi there. I'm looking at using Pants for a monorepo migration - we've got a number of Django apps which I've been working on porting over. I'm trying to run our test suite with pants but whenever I do it fails to find a single test
Copy code
$ pants run service/test_appname/runtests.py
Found 0 test(s).
System check identified no issues (1 silenced).
----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
If I run this same script with just
python
(using a venv I made earlier), it works fine. I've tried putting tests as a dependency in BUILD, though I'm not sure if this is right or not
Copy code
python_sources(
    name="lib",
    dependencies=[
        '//:reqs#django-…',
        # …
        'src/appname/core/apps.py',
        'src/appname/core/tests',
    ],
    overrides={
        "runtests.py": {
            "dependencies": [":lib"],
        },
    },
)
m
There’s an example here (django+pytest) if you want to take a look… https://github.com/pantsbuild/example-django/tree/main/helloworld/person