boundless-monitor-67068
06/16/2023, 6:53 PMconftest.py
, and I get a warning that pants cannot infer owners for pytest fixtures
(tried from pytest import fixture
as well as import pytest
) shouldn't that be built-in?fast-nail-55400
06/16/2023, 7:03 PMBUILD
file in that directory?fast-nail-55400
06/16/2023, 7:03 PMpants tailor
to create it.fast-nail-55400
06/16/2023, 7:04 PMconftest.py
is handled by that target type)boundless-monitor-67068
06/16/2023, 7:05 PM__defaults__(all=dict(skip_mypy=True))
python_tests()
python_test_utils(name="test_utils", dependencies=[":fixtures"])
files(name="fixtures", sources=["fixtures/**/*"])
fast-nail-55400
06/16/2023, 7:07 PMresources
instead of files
.boundless-monitor-67068
06/16/2023, 7:07 PMfast-nail-55400
06/16/2023, 7:08 PMboundless-monitor-67068
06/16/2023, 7:10 PMfast-nail-55400
06/16/2023, 7:48 PMboundless-monitor-67068
06/16/2023, 9:26 PM$ pants test python/cli/tests:
23:22:29.88 [WARN] Pants cannot infer owners for the following imports in the target python/cli/tests/conftest.py:test_utils:
* pytest.fixture (line: 6)
If you do not expect an import to be inferrable, add # pants: no-infer-dep to the import line. Otherwise, see <https://www.pantsbuild.org/v2.16/docs/troubleshooting#import-errors-and-missing-dependencies> for common problems.
fast-nail-55400
06/16/2023, 9:34 PMpytest
in it?boundless-monitor-67068
06/16/2023, 9:36 PMfast-nail-55400
06/16/2023, 9:37 PMfast-nail-55400
06/16/2023, 9:37 PMpytest
in it?fast-nail-55400
06/16/2023, 9:37 PMpytest
dependency.boundless-monitor-67068
06/16/2023, 9:38 PM[GLOBAL]
pants_version = "2.16.0"
backend_packages = [
"pants.backend.build_files.fmt.black",
"pants.backend.python",
"pants.backend.python.lint.black",
"pants.backend.python.lint.isort",
"pants.backend.python.lint.bandit",
"pants.backend.python.typecheck.mypy",
]
[anonymous-telemetry]
enabled = false
[python]
interpreter_constraints = ["==3.9.*"]
enable_resolves = true
[python-bootstrap]
search_path = ["<PYENV>"]
[pytest]
version = "pytest~=7.3.1"
extra_requirements = ["pytest-mock~=3.10.0", "pytest-cov~=4.1.0"]
lockfile = "build_support/pytest.lock"
[black]
version = "black[jupyter]~=22.12.0"
lockfile = "build_support/black.lock"
[bandit]
config = "pyproject.toml"
version = "bandit[toml]~=1.7.5"
lockfile = "build_support/bandit.lock"
this is my pants.toml file, I'm then generating lockfiles with pants generate-lockfiles
boundless-monitor-67068
06/16/2023, 9:39 PMfast-nail-55400
06/16/2023, 9:40 PMfast-nail-55400
06/16/2023, 9:40 PMfast-nail-55400
06/16/2023, 9:40 PMfast-nail-55400
06/16/2023, 9:41 PMfast-nail-55400
06/16/2023, 9:42 PMboundless-monitor-67068
06/16/2023, 9:43 PMfast-nail-55400
06/16/2023, 9:43 PMfast-nail-55400
06/16/2023, 9:44 PMfast-nail-55400
06/16/2023, 9:45 PMfast-nail-55400
06/16/2023, 9:45 PMfast-nail-55400
06/16/2023, 9:46 PMfast-nail-55400
06/16/2023, 9:46 PMboundless-monitor-67068
06/16/2023, 9:47 PMboundless-monitor-67068
06/16/2023, 9:47 PMfast-nail-55400
06/16/2023, 9:47 PMfast-nail-55400
06/16/2023, 9:48 PMboundless-monitor-67068
06/16/2023, 9:51 PMfast-nail-55400
06/16/2023, 9:54 PMfast-nail-55400
06/16/2023, 9:55 PMfast-nail-55400
06/16/2023, 9:56 PMboundless-monitor-67068
06/16/2023, 9:57 PMfast-nail-55400
06/16/2023, 10:02 PMfast-nail-55400
06/16/2023, 10:02 PMfast-nail-55400
06/16/2023, 10:02 PMboundless-monitor-67068
06/17/2023, 7:56 AM