Commit Graph

160 Commits

Author SHA1 Message Date
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
Bruno Oliveira 66f20b6f5e
Fix invalid Python file encoding "utf8" (#5252)
Fix invalid Python file encoding "utf8"
2019-05-23 20:24:23 -03:00
Anthony Sottile dc75b6af47 Use fix-encoding-pragma pre-commit hook 2019-05-14 15:56:31 -07:00
Bruno Oliveira 7573747cda Normalize all source encoding declarations 2019-05-14 19:42:44 -03:00
Anthony Sottile 4318698bae Remove 'b' from sys.stdout.mode 2019-05-14 15:00:59 -07:00
Raul Tambre 18024467ff
Fix invalid Python file encoding "utf8"
Since Python 3 it must be "utf-8", which is the official name.
This is backwards compatible with Python 2.
2019-05-12 19:14:06 +03: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 698c4e75fd capture: track current state in _state attributes
This is meant for debugging, and making assertions later.
2019-04-19 00:35:15 +02:00
Daniel Hahler 148f2fc72c Fix test_error_during_readouterr: syspathinsert is unused 2019-04-10 21:57:45 +02:00
Zac-HD 00810b9b2a Register "issue" mark for self-tests 2019-03-31 14:22:30 +11:00
Daniel Hahler e1ae469504 Merge master into features 2019-03-26 10:23:21 +01:00
Daniel Hahler d0f3f26fff test_collect_capturing: cover captured stderr 2019-03-23 23:17:07 +01: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
Daniel Hahler da81c1e49a
Merge pull request #4950 from blueyed/capture
Revisit capturing module: repr, doc fixes, minor
2019-03-20 01:12:22 +01:00
Daniel Hahler 920bffbfbb Revisit _pytest.capture: repr, doc fixes, minor 2019-03-19 01:17:21 +01:00
Daniel Hahler 98981276a0 capture: fix FDCapture.__repr__ without targetfd_save 2019-03-18 02:33:03 +01:00
Daniel Hahler 83558a0ba3 tests: make test_crash_on_closing_tmpfile_py27 more reliable
It fails reliable for me now without the fix from 9517c3a2a.

Ref: #2370
2019-03-04 15:04:55 +01:00
Daniel Hahler a51dc0c7ce Validate type with writing to captured output like without
Fixes https://github.com/pytest-dev/pytest/issues/4861.
2019-03-01 14:03:51 +01:00
Thomas Hisch a2954578aa Remove stdlib test 2019-01-22 20:25:51 +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 0db5ccb0dd Merge master into features 2018-12-10 05:42:07 +01:00
Pedro Algarvio 6da8befc74
Black suggestions 2018-12-03 12:58:22 +00:00
Pedro Algarvio 14024c7fc1
Test case for #4500 bug and respective fix #4487 2018-12-03 12:17:14 +00:00
Pedro Algarvio 517b8bc69e
Stop using the deprecated `\.warn()` log handler method 2018-12-03 11:52:33 +00: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 b3700f61ba Fix formatting of print() calls 2018-11-22 00:15:14 -08:00
Anthony Sottile 4bf6a07fe2
Merge pull request #4305 from RonnyPfannschmidt/cleanup-tobytes
replace byte/unicode helpers in test_capture with python level syntax
2018-11-04 17:29:41 -08:00
Ronny Pfannschmidt 7cb271b46f replace byte/unicode helpers in test_capture with python level syntax 2018-11-04 22:01:01 +01:00
Anthony Sottile 2368fbb63c Apply reorder-python-imports to all files 2018-10-25 00:01:29 -07:00
Bruno Oliveira 8e4501ee29 Use std_warn for warning about applying marks directly to parameters 2018-09-04 11:35:34 -03:00
Anthony Sottile 99e31f6fb1 Use `bytes` directly instead of `binary_type`
`bytes` is an alias for `str` in python2.6+
2018-08-23 18:55:21 -07:00
Anthony Sottile 85482d575e Replace Source with dedent where possible 2018-08-23 09:06:17 -07:00
Anthony Sottile 0fc4a806e5 py.builtins._totext -> string literals or six.text_type 2018-08-22 23:00:04 -07:00
Bruno Oliveira f1079a8222
Merge pull request #3832 from Sup3rGeo/bugfix/capsys-with-cli-logging
Bugfix/capsys with cli logging (again)
2018-08-21 20:12:31 -03:00
Victor 70ebab3537 Renamed snap_global_capture to read_global_capture. 2018-08-20 17:48:14 +02:00
Victor d611b03589 Parametrized tests for capfd as well. Separated global capture test. 2018-08-20 12:23:59 +02:00
victor 7ea4992f16 Fixed linting. 2018-08-19 15:46:02 +02:00
victor 0564b52c0e Fixed integration with other modules/tests 2018-08-19 15:26:57 +02:00
victor 9e382e8d29 Fixed test. 2018-08-19 14:29:57 +02:00
victor 2255892d65 Improved test to cover more cases. 2018-08-19 13:44:12 +02:00
Bruno Oliveira f4c5994d27 Fixtures during teardown can use capsys and capfd to get output from tests
Fix #3033
2018-08-18 14:46:24 -03:00
Tyler Richard c24c7e75e2 Added regression test for capfd in a fixture 2018-08-18 14:11:04 -03:00
Victor 3059bfb1b3 Update test with another problem. 2018-08-17 13:00:27 +02:00
Victor da9d814da4 Added test. 2018-08-17 00:20:51 +02:00
Anthony Sottile 4ae93a7a07 Remove obsolete __future__ imports 2018-07-08 08:37:02 -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 3e08c4ee64 sort out flake8 issues and unicode name usage 2018-05-23 18:12:04 +02:00