Ronny Pfannschmidt
2b92fee1c3
initial conversion of exit codes to enum
2019-06-15 06:48:00 +02:00
Bruno Oliveira
1f8fd421c4
item.obj is again a bound method on TestCase function items
...
Fix #5390
2019-06-04 20:22:49 -03:00
Anthony Sottile
5dcf85c17e
manual: remove dependence on six
2019-06-03 12:08:02 -03: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
Bruno Oliveira
4d49ba6529
Drop Python 2.7 and 3.4 support
...
* Update setup.py requires and classifiers
* Drop Python 2.7 and 3.4 from CI
* Update docs dropping 2.7 and 3.4 support
* Fix mock imports and remove tests related to pypi's mock module
* Add py27 and 34 support docs to the sidebar
* Remove usage of six from tmpdir
* Remove six.PY* code blocks
* Remove sys.version_info related code
* Cleanup compat
* Remove obsolete safe_str
* Remove obsolete __unicode__ methods
* Remove compat.PY35 and compat.PY36: not really needed anymore
* Remove unused UNICODE_TYPES
* Remove Jython specific code
* Remove some Python 2 references from docs
Related to #5275
2019-06-02 14:39:11 -03:00
Anthony Sottile
dc75b6af47
Use fix-encoding-pragma pre-commit hook
2019-05-14 15:56:31 -07:00
Bruno Oliveira
f1183c2422
Remove the 'issue' marker from test suite
...
It doesn't seem to add much value (why would one execute tests
based on that marker?), plus using the docstring for that
encourages one to write a more descriptive message about the test
2019-05-09 19:36:38 -03:00
Daniel Hahler
08f3b02dfc
tests: fnmatch_lines: use list
...
For strings fnmatch_lines converts it into a Source objects, splitted on
newlines. This is not necessary here, and it is more consistent to use
lists here in the first place.
2019-03-23 11:36:18 +01:00
Bruno Oliveira
c3d7340542
Fix setUpClass being called in subclasses that were skipped
...
Fix #4700
2019-01-31 20:24:11 -02:00
Anthony Sottile
b3700f61ba
Fix formatting of print() calls
2018-11-22 00:15:14 -08:00
Anthony Sottile
2368fbb63c
Apply reorder-python-imports to all files
2018-10-25 00:01:29 -07:00
Bruno Oliveira
212937eb3e
Improve error message when TestCase functions use a parametrized fixture
...
Fix #2535
2018-10-03 19:43:46 -03:00
Wes Thomas
051db6a33d
Trimming Trailing Whitespace
2018-08-08 18:18:18 -05:00
Wes Thomas
aa358433b0
Fix AttributeError bug in TestCaseFunction.teardown by creating TestCaseFunction._testcase as attribute of class with a None default.
2018-08-08 18:13:21 -05:00
Anthony Sottile
cbaa7dd56a
Upgrade pre-commit hooks except pyupgrade
2018-06-26 06:35:27 -07:00
Bruno Oliveira
1b16d649f9
Fix formatting of merged files
2018-05-25 18:21:48 -03:00
Bruno Oliveira
6f8547cc1a
Merge branch 'master' into pre-commit-hook
2018-05-25 18:14:43 -03:00
Ronny Pfannschmidt
da2c2e8492
more debugging for #3498
2018-05-24 09:58:36 +02:00
Ronny Pfannschmidt
74cfdc5feb
add failing test for #3498
2018-05-24 07:30:38 +02:00
Ronny Pfannschmidt
703e4b11ba
run black
2018-05-23 16:48:46 +02:00
Bruno Oliveira
983a09a2d4
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2017-11-10 18:33:02 -02:00
Bruno Oliveira
03829fde8a
Fix linting E741: ambiguous variable name
2017-11-04 13:59:10 -02:00
hugovk
ef732fc51d
Remove code for unsupported Python versions
2017-10-10 08:54:56 +03:00
Bruno Oliveira
3dc0da9339
Remove __multicall__ warning and usages in testing
...
pluggy>=0.5 already warns about those
2017-09-01 18:53:06 -03:00
Bruno Oliveira
bda07d8b27
Ignore socket warnings on windows for trial tests
2017-07-22 21:44:18 -03:00
Bruno Oliveira
0726d9a09f
Turn warnings into errors in pytest's own test suite
...
Fix #2588
2017-07-22 21:44:18 -03:00
Andras Tim
b840622819
Fixed E302 flake8 errors
...
expected 2 blank lines, found 0
2017-07-17 01:44:23 +02:00
Andras Tim
6146ac97d9
Fixed E101 flake8 errors
...
indentation contains mixed spaces and tabs
2017-07-17 01:28:16 +02: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
Dan Wandschneider
e46e653794
Clean up unittest TestCase objects after tests are complete ( #1649 ).
...
Fix #1649
Users of unittest style TestCases will create expensive objects
in setUp. We should clean up TestCase instances that are lying
around so that they don't fill up memory.
2016-11-07 18:32:56 -08:00
Bruno Oliveira
3ba475c0f2
Move internal _is_unittest_unexpected_success_a_failure to "compat" module
...
Fix #1815
2016-08-17 22:50:10 -03:00
Bruno Oliveira
463e6572c5
Merge branch 'master' into merge-master-into-features
...
Preparing for 3.0
2016-08-17 22:39:23 -03:00
Bruno Oliveira
4ed412eb59
unittest's unexpectedSuccess should work as non-strict xpass
...
Make sure tests for that behavior obtain the same return code
using either pytest or unittest to run the same file
2016-08-17 21:32:04 -03:00
Raphael Pierzina
14a4dd0697
Extend test to verify longrepr in stdout
2016-08-12 23:31:38 +01:00
Raphael Pierzina
10a6ed1707
Update unittest test to expect failure for an unexpected success
2016-08-12 23:18:02 +01:00
Bruno Oliveira
458ecae1df
Replace all usages of "pytest_funcarg__" for @pytest.fixture
2016-07-11 22:21:52 -03:00
AbdealiJK
d4c9fa9f1a
unittest.UnitTestCase: Allow __test__ for methods
...
__test__ needs to be checked for methods of a class too. Earlier,
this was not done, and all methods in a class was assumed to be
a test. This commit adds the appropriate condition to ensure that
if the __test__ is set to False, it does not collect that method.
Fixes https://github.com/pytest-dev/pytest/issues/1558
2016-05-19 08:19:57 +05:30
Bruno Oliveira
a912d3745b
Moved py.code code over to py.test
...
Fix #103
2016-01-25 23:18:04 -02:00
Bruno Oliveira
7d6edb9ca5
Fix unittest.skip decorator test and separate the fix into a different, self-doc function
2015-11-04 19:54:18 -02:00
Lee Kamentsky
313050b15b
Suggested edits by Bruno.
...
Moved fix to TestCaseFunction.setup. Added myself to AUTHORS and added entry to CHANGELOG
2015-11-04 15:30:16 -05:00
Lee Kamentsky
1833547936
Added test for issue #1169
...
(I undid my fix, checked for failure, redid my fix and it passes)
2015-11-04 14:24:22 -05:00
Bruno Oliveira
2ffd37b816
return non-zero exit code if no tests are collected
...
Fix #812
Fix #500
2015-08-18 07:35:02 -03:00
Bruno Oliveira
df29120abe
Merge branch 'pytest-2.7'
...
Conflicts:
_pytest/config.py
_pytest/genscript.py
_pytest/mark.py
tox.ini
2015-07-23 22:35:51 -03:00
Bruno Oliveira
31cfbac1f4
Fix autouse fixtures defined in a TestCase subclass
2015-07-20 19:28:54 -03:00
holger krekel
13c01193d6
Merge remote-tracking branch 'origin/pytest-2.7'
2015-06-19 10:03:37 +02:00
Bruno Oliveira
f90b2f845c
unittest.SkipTest now reports original function location
...
Fix #748
2015-06-18 22:27:43 -03:00
holger krekel
894d7dca22
avoid undocumented special casing of "pytest_" prefix
...
--HG--
branch : plugin_no_pytest
2015-04-22 13:44:37 +02:00