https://pantsbuild.org/ logo
#general
Title
# general
r

rhythmic-morning-87313

05/03/2022, 8:43 AM
Q24: When running tests via
./pants test
,
pyproject.toml
with
tool.pytest
section seems not to be applied. Adding explicit dependency from
python_tests
target to
resource(name="pyproject", source="pyproject.toml")
as
//:pyproject
makes the pants engine to crash:
Copy code
08:40:29.91 [ERROR] panic at 'called `Result::unwrap()` on an `Err` value: PyErr { type: <class 'TypeError'>, value: TypeError("format_exception() got an unexpected keyword argument 'etype'"), traceback: Some(<traceback object at 0xffff7fa3c2c0>) }', src/python.rs:432
08:40:29.91 [ERROR] Please set RUST_BACKTRACE=1, re-run, and then file a bug at <https://github.com/pantsbuild/pants/issues>.
08:40:29.92 [INFO] Filesystem changed during run: retrying `Test` in 500ms...
How do I let my tests recognize
pyproject.toml
in the repository root? (It's not used for distribution builds but only to configure tools)
1
b

bitter-ability-32190

05/03/2022, 11:29 AM
You should probably file an issue regarding the crash
And IIRC pytest looks for
tool.pytest.ini_options
. try that?
❤️ 1
r

rhythmic-morning-87313

05/03/2022, 11:34 AM
it was it!
i will file github issues for the crash issues...
i've read the pytest docs mentioning that, but forgot to update my config.... T_T
hmm I'm seeing this error in other situations as well..
filing an github issue
6 Views