Conversation
459f778 to
8f021a2
Compare
|
I don't understand why the test fails on py310 and py311. It seems to do it only when running with |
|
It's a Python bug python/cpython#85308 that it seems was only fixed in Python 3.12. So we should ignore |
bluetech
left a comment
There was a problem hiding this comment.
Thanks!
Can you also add a test using pytester to testing/acceptance_test.py? This will make sure it works end-to-end.
Sure! |
|
There is no reason to warn about it, I think it's a good thing.
…On Thu, Mar 7, 2024, at 21:38, Levon Saldamli wrote:
***@***.**** commented on this pull request.
In changelog/11871.feature.rst <#12085 (comment)>:
> +Added support for reading ``file_or_dir`` positional arguments from a file
+using the prefix character '@', like e.g.:
+
+``pytest @tests.txt``
You're right, it is not only positional arguments. `-k foo` in the file is treated as a `-k`-argument. Is this ok, as long as I update the changelog and warn about it? Not sure if and how it would be possible to avoid it.
—
Reply to this email directly, view it on GitHub <#12085 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAJKW7UTZYQFEYDN7KBVEC3YXC635AVCNFSM6AAAAABEJ6MDI6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTSMRTGM3TAOJRGE>.
You are receiving this because you commented.Message ID: ***@***.***>
|
24675ae to
bc68ed1
Compare
Acceptance test added. |
bc68ed1 to
4e530e1
Compare
bluetech
left a comment
There was a problem hiding this comment.
A few small comments, but with them I think this is good to go.
Co-authored-by: Ran Benita <ran@unusedvar.com>
Co-authored-by: Ran Benita <ran@unusedvar.com>
56bac60 to
a413282
Compare
Thanks! Updated now. |
nicoddemus
left a comment
There was a problem hiding this comment.
Great work, thanks!
We should add this feature to the docs, I think here is a good place to mention it:
https://docs.pytest.org/en/stable/how-to/usage.html#specifying-which-tests-to-run
I made an attempt, please check if it works :) |
5a98980 to
f66dbf5
Compare
f66dbf5 to
1cf0413
Compare
Co-authored-by: Ran Benita <ran@unusedvar.com> Co-authored-by: Bruno Oliveira <bruno@soliv.dev>
|
That's a very nice feature - can it also read in parameterized tests though such as: from a file? It doesn't seem to find them |
|
@patrickvonplaten The tests added in this PR test exactly that. I suggest you open a new issue with more information and a reproducer. |
|
Actually everything works just fine - sorry for the noise |
Fixes #11871 using the proposed solution in #11871 (comment)
Adds support for reading
file_or_dirpositional arguments from a fileusing the prefix character '@', like e.g.:
pytest @tests.txtAdded tests, but not sure how/where to add documentation, I'm guessing it should be in the output of
pytest --help?