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

shy-advantage-49800

11/12/2022, 2:00 PM
It's a bit troublesome that if I forget to add the requirements on the
pyproject.toml
, the tests works anyway ... 🤔 Can't pants make sure that I've included them in the
METADATA
or something like that?
ah, I need to do some kind of smoke test, right?
h

hundreds-father-404

11/14/2022, 5:23 PM
I don't think I understand what you mean?The tests still work?
how are you using pyproject.toml? Do you mean when building a distribution you distribute? Or like specifying your project's deps via Poetry and
poetry_requirements
on this last link
if I forget to add "starlette" as dependency
my tests will still pass
h

hundreds-father-404

11/14/2022, 5:48 PM
s

shy-advantage-49800

11/14/2022, 9:15 PM
so I need to add all of them there?
h

hundreds-father-404

11/14/2022, 9:28 PM
it's not enough to do that: you would then want to inside your actual test do something like
subprocess.run(["path/to/foo.pex"])
for example. This would be an integration style test. All that
runtime_package_dependencies
will do is have Pants build your binaries and insert the results into the sandbox used by your test run. It's on you to then do something interesting with those files inside your integration test
s

shy-advantage-49800

11/14/2022, 9:45 PM
any good repo to share about a good setup regarding all this?
h

hundreds-father-404

11/14/2022, 11:11 PM
5 Views