Commit Graph

76 Commits

Author SHA1 Message Date
Anthony Sottile 19c9e53604 Make sure to quote `sys.executable` as we're running a shell 2019-09-23 08:58:56 -07:00
Tomáš Chvátal 04c01fb606
test_argcomplete do not call python directly #5872
Use sys.executable to detect which python we should actually be testing.
2019-09-23 16:38:15 +02:00
Zac Hatfield-Dodds d72fb73fa0 Do not allow abbreviated arguments 2019-06-25 13:51:33 +10:00
Anthony Sottile a91fe1fedd pre-commit run pyupgrade --all-files 2019-06-03 12:08:02 -03:00
Anthony Sottile 3f1ec520fc pre-commit run reorder-python-imports --all-files 2019-06-03 12:08:01 -03:00
Anthony Sottile 5034399d7a pre-commit run fix-encoding-pragma --all-files 2019-06-03 12:08:01 -03:00
Anthony Sottile dc75b6af47 Use fix-encoding-pragma pre-commit hook 2019-05-14 15:56:31 -07:00
Daniel Hahler ccab469a0c Fix test_argcomplete: use python -m pytest
Previously it was not run with a) xdist ("-c"), and b) "python -m
pytest" ("…/pytest.py", not executable).
2019-02-27 16:52:46 +01:00
Daniel Hahler f13935da53 Display --help/--version with ArgumentErrors 2019-02-11 15:49:48 +01:00
Anthony Sottile 92a2c1a9c4 remove and ban py.io.BytesIO, py.process, py.path.local.sysfind 2019-01-21 19:51:16 -08:00
Daniel Hahler 3445eae737 argparsing: Parser: allow to forward prog to argparse
Ref: https://github.com/pytest-dev/pytest-xdist/pull/388.
2018-12-11 06:22:35 +01:00
Anthony Sottile 1bba0a9714 Deprecate `raises(..., 'code(as_a_string)')` / `warns(..., 'code(as_a_string)') 2018-11-29 09:34:51 -08:00
Anthony Sottile 2368fbb63c Apply reorder-python-imports to all files 2018-10-25 00:01:29 -07:00
Anthony Sottile 8bb8b91357 pyupgrade 1.4: tests 2018-08-22 18:47:21 -07:00
Anthony Sottile cbaa7dd56a Upgrade pre-commit hooks except pyupgrade 2018-06-26 06:35:27 -07:00
Ronny Pfannschmidt 464117b472 fix imports in tests 2018-06-05 10:20:36 +02:00
Ronny Pfannschmidt 703e4b11ba run black 2018-05-23 16:48:46 +02:00
Ronny Pfannschmidt 9aacb4635e run pyupgrade 2018-05-23 16:45:09 +02:00
Anthony Sottile bd1d17e8de Replace py.std with stdlib imports 2018-01-09 12:44:10 -08:00
hugovk ef732fc51d Remove code for unsupported Python versions 2017-10-10 08:54:56 +03:00
Andras Tim 15610289ac Fixed E712 flake8 errors
comparison to True should be ‘if cond is True:’ or ‘if cond:’
2017-07-17 01:44:23 +02:00
Andras Tim 45ac863069 Fixed E401 flake8 errors
multiple imports on one line
2017-07-17 01:44:23 +02:00
Andras Tim b840622819 Fixed E302 flake8 errors
expected 2 blank lines, found 0
2017-07-17 01:44:23 +02:00
Andras Tim c9a081d1a3 Fixed E271 flake8 errors
multiple spaces after keyword
2017-07-17 01:44:22 +02:00
Andras Tim b226454582 Fixed E251 flake8 errors
unexpected spaces around keyword / parameter equals
2017-07-17 01:44:22 +02:00
Andras Tim 617e510b6e Fixed E231 flake8 errors
missing whitespace after ‘,’, ‘;’, or ‘:’
2017-07-17 01:44:22 +02:00
Andras Tim 2e8caefcab Fixed E225 flake8 errors
missing whitespace around operator
2017-07-17 01:44:22 +02:00
Andras Tim cf97159009 Fixed E128 flake8 errors
continuation line under-indented for visual indent
2017-07-17 01:28:16 +02:00
Andras Tim 57438f3efe Fixed E127 flake8 errors
continuation line over-indented for visual indent
2017-07-17 01:28:16 +02:00
Bruno Oliveira fa56114115 Clean up warnings generated by pytest's own suite 2017-03-20 22:13:17 -03:00
Bruno Oliveira 42a5d6bdfa Add __future__ imports to all pytest modules
This prevents silly errors from creeping in Python 2 when testing in Python 3
2017-03-16 22:45:40 -03:00
Michal Wajszczuk fb0b90646e New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
Bruno Oliveira 1eb5a690d4 Fix flake8 E305 and E306 errors
These errors started to appear with flake8-3.1.1, while they don't appear with
version 3.1.0 (weird).
2016-11-20 18:59:15 -02:00
Bruno Oliveira 620b384b69 Fix cmdline help message for custom options with two or more metavars
Fix #2004
2016-10-20 20:34:39 -02:00
Ronny Pfannschmidt b9a91dc112 merge from master to features 2016-07-06 11:51:48 +02:00
Daniel Hahler 939407ef63 Simplify Argument.__repr__
I have came across this when noticing that universal-ctags fails to parse
this correctly (https://github.com/universal-ctags/ctags/issues/997).
2016-06-25 09:31:31 +02:00
Stefan Zimmermann 69bab4ab04 added check for already existing option names to OptionGroup.addoption() 2016-06-22 18:01:35 +02:00
Dave Hunt ef9dd14963 Introduce pytest command as recommended entry point
Fixes #1629
2016-06-21 16:16:57 +02:00
Bruno Oliveira af893aab26 Remove code related to support python <= 2.5
Fix #1226
2015-12-16 16:16:22 -02:00
Bruno Oliveira 4533a50542 Fix regression caused by changing the signature for parse_known_args
Fix #973
2015-08-27 19:35:32 -03:00
Bruno Oliveira 42b43a7d7b Paths after normal options are now properly used to discover rootdir and ini files
Fix #949
2015-08-25 22:08:05 -03:00
Floris Bruynooghe 4e8438afc8 Simply show the node ID for verbose output
This strips the line number, /@\d/, from the verbose output so it is
directly the node ID of the test.  This in turn means no special logic
for accepting the line number as part of the node ID is needed when
parsing the command line.
2014-08-01 00:29:35 +01:00
holger krekel 0d17dc1e19 add a comment for why we only consider .py files when removing @
--HG--
branch : fix_initial_parsing
2014-07-28 13:56:10 +02:00
holger krekel 40eed363e8 fix issue544 by only removing "@NUM" at the end of a part (parts are
separated by "::") and if the part has an .py extension.

--HG--
branch : fix_initial_parsing
2014-07-28 12:07:15 +02:00
Andy Freeland 2ba23e8d08 issue504: verbose output displays node IDs for each test
Replace the verbose per-test reporting format of `file:line test_name RESULT`
with the node ID of the test, i.e. `file@line::class::method[param] RESULT`.

This patch does not update the examples in the docs; @hpk42 has a script
to regenerate those.

--HG--
branch : issue504
2014-04-14 17:42:02 -04:00
holger krekel ebd10aa6b4 shrink and merge the somewhat obscure and undocumented internal hinting
system with the new warnings one
2014-03-11 22:10:51 +01:00
holger krekel 8ac5af2896 fix flakes issues and make --flakes run part of tox runs 2013-10-12 15:39:22 +02:00
holger krekel 5aa5b9748d fix argcomplete-test to use sys.argv[0] if it looks like a py.test executable 2013-10-03 18:02:54 +02:00
holger krekel db6f347db6 fix issue358 -- introduce new pytest_load_initial_conftests hook and make capturing initialization use it, relying on a new (somewhat internal) parser.parse_known_args() method.
This also addresses issue359 -- plugins like pytest-django could implement a pytest_load_initial_conftests hook like the capture plugin.
2013-09-30 13:14:16 +02:00
holger krekel 8b1e53f6d3 avoid creation of file in os.getcwd() cc avanderneut 2013-09-30 08:36:31 +02:00