Commit Graph

5850 Commits

Author SHA1 Message Date
Ronny Pfannschmidt 9af872a230 update changelog 2016-07-19 20:11:47 +02:00
Ronny Pfannschmidt 61cc5c4d4e argument parsing: always warn for string types
fix #1741
2016-07-19 10:33:25 +02:00
Ronny Pfannschmidt 317b3f257d optparse compatibility - add float and complex
also documents the implementation quality
fixes #457
2016-07-19 10:20:41 +02:00
Floris Bruynooghe 2b9973846e Merge pull request #1736 from Avira/features
Add backwards compatibility docs
2016-07-18 11:17:48 +02:00
Oliver Bestwalter 58a8150bc5 add backwards compatibility policy 2016-07-17 21:14:16 +02:00
Bruno Oliveira 0ac3eaa1db Merge pull request #1735 from flub/reinterpret-docs
Document the re-writing of plugins
2016-07-17 12:48:33 -03:00
Floris Bruynooghe 0a53797fa3 Document the re-writing of plugins 2016-07-17 12:30:21 +01:00
Ronny Pfannschmidt 8a73a2ad60 Merge pull request #1734 from nicoddemus/issue-1728-inconsistent-setup-teardown
setup_* and teardown_* functions argument now optional
2016-07-15 14:59:22 +02:00
Floris Bruynooghe fb21493856 Merge pull request #1733 from flub/remove-reinterpret
Remove assertion reinterpretation
2016-07-15 12:46:25 +01:00
Bruno Oliveira ff8fb4950e setup_* and teardown_* functions argument now optional
setup_module, setup_function and setup_method
extra argument are now optional and may be omitted.

Fix #1728
2016-07-14 23:41:40 -03:00
Floris Bruynooghe d1852a48b7 Remove assertion reinterpretation
The assertion reinterpretation is an old backwards compatibility
mode which was no longer being maintained on feature-parity with
the assertion rewriting mode.  It was also responsible for some
dubious patching of builtins and test with side-effects would
suddenly start passing.  Since re-writing has been the default for
a long time and plugins are now also re-written it is time to
retire reinterpretation.
2016-07-15 00:33:39 +01:00
Bruno Oliveira ee374e3b80 Merge pull request #1731 from nicoddemus/improve-test-args-deprecated
Make assert in test_str_args_deprecated more resilient
2016-07-14 19:18:13 -03:00
Bruno Oliveira 3328cd2620 Make assert in test_str_args_deprecated more resilient
This attempts to fix CI which broke because of this test.

Other warnings introduced in the future could break
this test.
2016-07-14 18:37:59 -03:00
Bruno Oliveira 350ebc9167 Merge pull request #1730 from RedBeardCode/pytest-1536
Added confcutdir in testing/test_conftest.py::test_conftest_import_or…
2016-07-14 17:02:58 -03:00
Floris Bruynooghe 24fbbbef1f Merge pull request #1641 from flub/rewrite-plugins
Rewrite plugins
2016-07-14 19:39:15 +01:00
RedBeardCode 22bb43413f Added confcutdir in testing/test_conftest.py::test_conftest_import_order and
testing/python/fixture.py::TestAutouseManagement::()::
  test_class_function_parametrization_finalization to avoid problems with
  abandoned conftest.py files in /tmp dir.
  Fixes #1536
2016-07-14 18:15:38 +02:00
Florian Bruhin 691dc8bc68 Merge pull request #1727 from nicoddemus/deprecate-str-pytest-main
Deprecate support for passing command-line as string to pytest.main()
2016-07-14 14:42:14 +02:00
Florian Bruhin 14af12cb7b Merge pull request #1717 from nicoddemus/nose-yield-tests-docs
Document limitations for yield-tests in nose
2016-07-14 14:40:27 +02:00
Floris Bruynooghe 51ee7f8734 Fixup things after rebase
Some changes to make things work on top of current features branch.
2016-07-14 12:42:29 +01:00
Bruno Oliveira 9007e16cdf Document limitations for yield-tests in nose
Also add nose doc to the root toctree

Closes #1716
2016-07-14 08:20:01 -03:00
Bruno Oliveira 02dd7d612a Remove duplicated changelog entry and formatting fix 2016-07-14 08:16:27 -03:00
Bruno Oliveira ab0b6faa5f Deprecate support for passing command-line as string to pytest.main()
Fixes #1723
2016-07-14 08:11:43 -03:00
Bruno Oliveira 1fb09d9dd5 Merge pull request #1726 from nicoddemus/warnings-displayed-by-default
Warnings displayed by default
2016-07-13 19:33:49 -03:00
Bruno Oliveira 1266ebec83 Merge remote-tracking branch 'upstream/features' into warnings-displayed-by-default
# Conflicts:
#	CHANGELOG.rst
#	testing/test_terminal.py
2016-07-13 18:45:15 -03:00
Bruno Oliveira 6e9ee2b766 Merge pull request #1724 from blueyed/followup-pr1718-remove-newline
funcarg_prefix_warning: remove newline
2016-07-13 15:46:16 -03:00
Daniel Hahler 3cfebdd7c5 funcarg_prefix_warning: remove newline
Followup to https://github.com/pytest-dev/pytest/pull/1718.
2016-07-13 18:33:24 +02:00
Floris Bruynooghe 743f59afb2 Introduce pytest.register_assert_rewrite()
Plugins can now explicitly mark modules to be re-written.  By default
only the modules containing the plugin entrypoint are re-written.
2016-07-13 17:31:09 +01:00
Floris Bruynooghe 944da5b98a Avoid rewrite warning for inline runs
When running pytest inline/inprocess we plugins have already been
imported and re-writen, so avoid the warning.
2016-07-13 17:29:19 +01:00
Floris Bruynooghe a98e3cefc5 Enable re-writing of setuptools-installed plugins
Hook up the PEP 302 import hook very early in pytest startup so
that it gets installed before setuptools-installed plugins are
imported.  Also iterate over all installed plugins and mark them
for rewriting.  If an installed plugin is already imported then
a warning is issued, we can not break since that might break
existing plugins and the fallback will still be gracefull to
plain asserts.

Some existing tests are failing in this commit because of the new
warning triggered by inline pytest runs due to the hypothesis
plugin already being imported.  The tests will be fixed in the next
commit.
2016-07-13 17:29:19 +01:00
Bruno Oliveira dd5ce96cd7 Merge pull request #1718 from blueyed/fix-funcarg_prefix_warning
Add punctuation to funcarg_prefix_warning
2016-07-13 12:53:54 -03:00
Florian Bruhin aeccd6b4a2 Merge pull request #1720 from nicoddemus/changelog-formatting
Improve overall CHANGELOG formatting and consistency for 3.0
2016-07-13 15:58:38 +02:00
Bruno Oliveira 44c3055e79 Merge pull request #1721 from bronsen/patch-1
Docs: De-404 links in changelog
2016-07-13 10:05:14 -03:00
Bruno Oliveira 4a763accc5 Improve overall CHANGELOG formatting and consistency for 3.0 2016-07-13 08:52:36 -03:00
Kalle Bronsen dfe1209d2c De-404 links in changelog 2016-07-13 11:41:27 +02:00
Florian Bruhin 54ea27c283 Merge pull request #1719 from nicoddemus/fix-2.10-versions-in-docs
Fix 2.10 -> 3.0 versions in docs
2016-07-13 08:10:13 +02:00
Bruno Oliveira f827810fa8 Fix 2.10 -> 3.0 versions in docs 2016-07-12 21:02:40 -03:00
Daniel Hahler 15e97a7c78 Add punctuation to funcarg_prefix_warning 2016-07-12 23:49:09 +02:00
Ronny Pfannschmidt c4f20a1834 Merge pull request #1712 from anntzer/custom-debugger
Allow passing a custom Pdb subclass via --pdbcls.
2016-07-12 16:45:07 +02:00
Ronny Pfannschmidt 4c56c95eb8 Merge pull request #1714 from nicoddemus/deprecate-yield-tests-funcarg-prefix
Deprecate yield tests funcarg prefix
2016-07-12 11:43:59 +02:00
Antony Lee 7ee3dd1cb5 Add tests for custom pdb class.
(and edit CHANGELOG)
2016-07-11 20:07:29 -07:00
Bruno Oliveira 458ecae1df Replace all usages of "pytest_funcarg__" for @pytest.fixture 2016-07-11 22:21:52 -03:00
Bruno Oliveira ad4125dc0d Deprecate "pytest_funcarg__" prefix to declare fixtures
Fixes #1684
2016-07-11 22:21:50 -03:00
Bruno Oliveira 5506dc700c Deprecate yield tests
Closes #16
Closes #1324
2016-07-11 22:21:49 -03:00
Bruno Oliveira 0dd1c8bf14 Add test to ensure capsys and capfd error out when using "getfixturevalue" inside a test 2016-07-11 20:48:38 -03:00
Bruno Oliveira 0ca06962e9 Improve docs 2016-07-11 20:33:16 -03:00
Bruno Oliveira 2ffe354f21 Add CHANGELOG for invocation-scoped fixtures 2016-07-11 20:32:59 -03:00
Bruno Oliveira fb4da00a32 Merge remote-tracking branch 'upstream/features' into invocation-scoped-fixtures 2016-07-11 20:09:13 -03:00
Bruno Oliveira 6f68dfcc47 Merge pull request #1710 from RonnyPfannschmidt/fixture-split
Fixture split 2nd attempt
2016-07-10 12:10:07 -03:00
Antony Lee 6383b53ad9 Allow passing a custom Pdb subclass via --pdbcls.
This obviates the need for plugins such as `pytest-ipdb`; instead one
can simply call `py.test --pdb=IPython.core.debugger:Pdb`
2016-07-09 21:10:52 -07:00
Bruno Oliveira 8ed055efd8 Add acceptance test for invocation-scoped fixtures 2016-07-09 22:52:07 -03:00