proud-dentist-22844
11/02/2022, 4:19 AMpython_tests(
dependencies=["st2common/tests/unit/base.py"],
)
or even a more specific version
python_tests(
overrides={
("test_db_auth.py", "test_db_pack.py", "test_db_rbac.py", ...etc): {
dependencies=["st2common/tests/unit/base.py"],
},
},
)
I wish I could do this instead:
python_tests(
module_dependencies_map={
# specify the whole import
"tests.unit.base": "st2common/tests/unit/base.py",
# or just the top level module:
"tests": "st2common/tests",
},
)
ie - tell the inference layer which file to use when it encounters a given uninferrable import (probably because it is ambiguous across the monorepo).
Thoughts? Does anyone else like this UX?
How feasible is something like this?hundreds-father-404
11/02/2022, 1:14 PMproud-dentist-22844
11/02/2022, 1:15 PMproud-dentist-22844
11/02/2022, 1:16 PMtests
directory/module.proud-dentist-22844
11/02/2022, 1:17 PM*/tests/unit/base.py
file.proud-dentist-22844
11/02/2022, 1:22 PM# pants: no-infer-dep
to a couple dozen test files all over the place. (I'm going to switch back to ignore
until there's an alternative).curved-television-6568
11/02/2022, 1:53 PMcurved-television-6568
11/02/2022, 1:54 PMproud-dentist-22844
11/02/2022, 2:19 PMproud-dentist-22844
11/02/2022, 4:17 PMcurved-television-6568
11/02/2022, 5:27 PM