Daniel Hahler
09bdbffbde
Merge master into features
...
Conflicts:
src/_pytest/_code/code.py
src/_pytest/main.py
2020-01-24 23:44:50 +01:00
Daniel Hahler
ef112fd7dd
Revert "Revert "Fix type errors after adding types to the `py` dependency""
...
Without changes to test_itemreport_reportinfo.
This reverts commit fb99b5c66e
.
Conflicts:
testing/test_nose.py
2020-01-23 10:45:27 +01:00
Ran Benita
fb99b5c66e
Revert "Fix type errors after adding types to the `py` dependency"
...
This reverts commit 930a158a6a
.
Regression test from Bruno Oliveira.
2020-01-20 23:44:56 +02:00
Ran Benita
930a158a6a
Fix type errors after adding types to the `py` dependency
2020-01-19 14:48:24 +02:00
Daniel Hahler
5f4cd536f9
Use _pytest.compat.TYPE_CHECKING
2020-01-16 19:47:23 +01:00
Ran Benita
dac16cd9e5
Add type annotations to _pytest.config.argparsing and corresponding Config code
2019-11-20 22:02:27 +02:00
Ran Benita
51f9cd0e02
argparsing: remove "map_long_option" Action attribute support
...
This feature was added in commit
007a77c2ba
, but was never used in pytest
itself. A GitHub code search doesn't find any users either (only pytest
repo copies). It seems safe to clean up.
2019-11-20 17:09:24 +02:00
Daniel Hahler
54a954514b
re-run black
2019-11-16 18:55:32 +01:00
Daniel Hahler
55bc084dcc
doc: s/_pytest.config.Parser/_pytest.config.argparsing.Parser/
2019-11-13 23:22:25 +01:00
Ran Benita
c2f762460f
Merge pull request #5673 from bluetech/type-annotations-3
...
1/X Fix check_untyped_defs = True mypy errors
2019-08-20 17:20:40 +03:00
Daniel Hahler
2a6a1ca07d
Inject width via pylib to argparse formatter
...
`argparse.HelpFormatter` looks at `$COLUMNS` only, falling back to a
default of 80.
`py.io.get_terminal_width()` is smarter there, and could even work
better with https://github.com/pytest-dev/py/pull/219 .
This ensures to use a consistent value for formatting the ini values etc.
2019-08-17 16:51:02 +02:00
Ran Benita
7259c453d6
Fix some check_untyped_defs = True mypy warnings
2019-08-16 10:41:57 +03:00
Semen Zhydenko
b3f4398d64
surpressing -> suppressing
2019-08-01 15:11:38 +02:00
Bruno Oliveira
9021194efd
Apply workaround for multiple short options for Python <= 3.8
...
Hopefully by Python 3.9 this will be fixed upstream, if not we will
need to bump the version again.
Fix #5523
2019-06-29 11:15:28 -03: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
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
f13935da53
Display --help/--version with ArgumentErrors
2019-02-11 15:49:48 +01: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
Ville Skyttä
22ab737243
Spelling and grammar fixes
2018-10-29 23:45:45 +02:00
Anthony Sottile
2368fbb63c
Apply reorder-python-imports to all files
2018-10-25 00:01:29 -07:00
CrazyMerlyn
b01704cce1
Fix exit code for command line errors
...
Fixes #3913
2018-09-03 04:16:35 +00:00
wim glenn
917b99e438
More unicode whack-a-mole
...
It seems pytest's very comprehensive CI sniffed out a few other places with similar bugs. Ideally we should find all the places where args are not stringy and solve it at the source, but who knows how many people are relying on the implicit string conversion. See [here](https://github.com/pytest-dev/pytest/blob/master/src/_pytest/config/__init__.py#L160-L166 ) for one such problem area (args with a single py.path.local instance is converted here, but a list or tuple containing some are not).
2018-08-22 13:40:21 -05:00
Bruno Oliveira
be11d3e195
Improve warning messages when addoption is called with string as `type`
...
Encountered the warning myself and to me the message was not clear about
what should be done to fix the warning
2018-08-10 12:49:06 -03:00
Anthony Sottile
cbaa7dd56a
Upgrade pre-commit hooks except pyupgrade
2018-06-26 06:35:27 -07:00
Ronny Pfannschmidt
c9df77cbd6
move argument parser to own file
2018-06-05 09:55:28 +02:00