Commit Graph

940 Commits

Author SHA1 Message Date
holger krekel 894d7dca22 avoid undocumented special casing of "pytest_" prefix
--HG--
branch : plugin_no_pytest
2015-04-22 13:44:37 +02:00
holger krekel 20d6c0b560 simplify exception capturing
--HG--
branch : plugin_no_pytest
2015-04-22 13:37:42 +02:00
holger krekel c08dfdc330 move bookkeeping of conftest plugins in core pluginmanager to PytestPluginManager
--HG--
branch : plugin_no_pytest
2015-04-22 13:33:01 +02:00
holger krekel 7049ebe4e2 avoid prepend to register api as it's redundant wrt to hooks
--HG--
branch : plugin_no_pytest
2015-04-22 13:31:46 +02:00
holger krekel 1ef49ac5ab minimize HookRelay to become a pure container, refactor initialization and
tests of plugin management to be a bit better split between pytest
and pytest-independent bits

--HG--
branch : plugin_no_pytest
2015-04-22 13:31:46 +02:00
holger krekel db650de372 remove redundant py check as our setup.py excludes py <=1.4 already
--HG--
branch : plugin_no_pytest
2015-04-22 10:04:13 +02:00
Floris Bruynooghe 240cd1f28d Merge cleaning of sys.modules after pytester.inline_run()
Merged in schettino72/pytest/pytester-inline-run-clean-sys-modules
(pull request #278).
2015-04-21 11:00:32 +01:00
Floris Bruynooghe 31af381c56 Merged in hpk42/pytest-patches/prefer_installed (pull request #275)
change test module importing behaviour to append to sys.path
2015-04-21 10:47:33 +01:00
Eduardo Schettino bc0ecd1d06 pytester: add method ``TmpTestdir.delete_loaded_modules()``
, and call it from ``inline_run()`` to allow temporary modules to be reloaded.

--HG--
branch : pytester-inline-run-clean-sys-modules
2015-04-21 10:18:04 +08:00
holger krekel bac1ccd5b3 merge fix of issue553 on pytest-2.7 2015-04-17 22:32:49 +02:00
holger krekel 0b361c62c8 Merged in getsourcelines-error-issue-553-pytest2.7 (pull request #273)
Handle inspect.getsourcelines failures in FixtureLookupError

--HG--
branch : pytest-2.7
2015-04-17 22:31:55 +02:00
holger krekel 5c8e5acf9d change test module importing behaviour to append to sys.path
instead of prepending.  This better allows to run test modules
against installated versions of a package even if the package
under test has the same import root.  In this example::

   testing/__init__.py
   testing/test_pkg_under_test.py
   pkg_under_test/

the tests will preferrably run against the installed version
of pkg_under_test whereas before they would always pick
up the local version.

--HG--
branch : prefer_installed
2015-04-17 22:25:35 +02:00
Floris Bruynooghe fb07a09964 Merge pull request #274 from pytest-2.7
fixed regression to 2.6.4 which surfaced e.g. in lost stdout capture printing
2015-04-17 11:10:47 +01:00
Floris Bruynooghe 6e2bc7712c Merged in hpk42/pytest-patches/systemexit (pull request #274)
fixed regression to 2.6.4 which surfaced e.g. in lost stdout capture printing

--HG--
branch : pytest-2.7
2015-04-17 11:07:24 +01:00
holger krekel 173bd13ece backport Y->y fix from floris
--HG--
branch : pytest-2.7
2015-04-17 11:57:09 +02:00
holger krekel e04273df57 fixed regression to 2.6.4 which surfaced e.g. in lost stdout capture printing
when tests raised SystemExit.

--HG--
branch : systemexit
2015-04-17 11:47:29 +02:00
Bruno Oliveira 15328c04eb Handle inspect.getsourcelines failures in FixtureLookupError
Fixes #553

--HG--
branch : getsourcelines-error-issue-553-pytest2.7
2015-04-15 19:31:22 -03:00
Floris Bruynooghe c7a60af666 Use capital Y as the tests look for that 2015-04-13 09:08:10 +01:00
Floris Bruynooghe 09dff73607 Merge pytest-2.7 for issue660 fix 2015-04-13 00:04:53 +01:00
Floris Bruynooghe bf0b70aa66 Some docstrings for the pytester plugin
These aren't quite complete but are a jolly good start anyway.  It
seems better to commit this now then leave it lingering until it
gets lost.
2015-04-11 17:07:37 +01:00
holger krekel 79c0515945 merge pytest-2.7 branch
--HG--
branch : issue660
2015-04-04 16:35:14 +02:00
holger krekel 74019025b9 shift default to 2.8.0.dev 2015-04-04 16:32:25 +02:00
holger krekel b55d66d0cf - avoid setting of versions and targets in conf.py and Makefile
as discussed on pytest-dev

- "make help" now prints pytest specific information.

- add a "_getdoctarget.py" helper

- make ``setup.py`` read the version from ``_pytest/__init__.py``

--HG--
branch : release-checklist
2015-04-02 10:38:25 +02:00
holger krekel 3ed3e51997 fix issue660: properly report fixture scope mismatches independent
from fixture argument ordering.

--HG--
branch : issue660
2015-04-01 18:42:48 +02:00
holger krekel e16983d265 bump versions to dev, including changing the doc-install target to "dev"
instead of "latest"
2015-03-26 13:48:59 +01:00
holger krekel d2a8866bce bump verrsion to python2.7, fix a too precise test for windows, regen docs 2015-03-26 09:34:10 +01:00
Anatoly Bubenkov 55eb82c434 fix pep257 2015-03-23 21:28:29 +01:00
Anatoly Bubenkov d94a29e866 merge almarklein/default 2015-03-23 21:25:10 +01:00
Anatoly Bubenkov ce95437dee merge with default
--HG--
branch : issue463
2015-03-23 20:41:27 +01:00
Brianna Laugher c019e489d2 Change docstring style
--HG--
branch : issue463
2015-03-23 20:27:53 +01:00
Brianna Laugher 43e4fcf6dd Raise specific MarkerError rather than generic ValueError
--HG--
branch : issue463
2015-03-23 20:01:58 +01:00
tigeraniya 65ca554230 duplicate assignment 2015-03-23 20:47:34 +05:30
holger krekel f3580bee2d fix issue435: make reload() work when assert rewriting is active.
Thanks Daniel Hahler.
2015-03-23 10:08:47 +01:00
Brianna Laugher deb163d237 Change string format syntax from {} to {0} for py2.6
--HG--
branch : issue463
2015-03-21 23:57:06 +01:00
Brianna Laugher 6f81602ba2 Use hasattr instead of try/except
--HG--
branch : issue463
2015-03-21 23:30:13 +01:00
Brianna Laugher ac17f20d98 #463
Raise a ValueError early if user misspells 'parametrize' as 'parameterize'.

--HG--
branch : issue463
2015-03-21 23:06:25 +01:00
Almar Klein 9726fafa98 allow postmortem debugging on failed test 2015-03-21 09:26:35 +01:00
Bruno Oliveira eead0365b5 Merged in parametrized-fixture-override (pull request #257)
allow to override parametrized fixtures with non-parametrized ones and vice versa
2015-03-12 09:40:56 -03:00
Daniel Hahler 5d6b0a59c0 Strip docstrings in output with `--fixtures`
Fixes https://bitbucket.org/pytest-dev/pytest/issue/550.

--HG--
branch : strip-docstrings-from-fixtures
2015-03-04 17:00:24 +01:00
Daniel Hahler c629f6b18b Fix `reload()` with modules handled via `python_files`
If a module exists in `sys.modules` already, `load_module` has to return it.

Fixes https://bitbucket.org/pytest-dev/pytest/issue/435

--HG--
branch : fix-reload
2015-03-04 16:21:27 +01:00
Anatoly Bubenkov 33c2a3a3e5 make loop more readable
--HG--
branch : parametrized-fixture-override
2015-03-02 08:55:57 +01:00
Anatoly Bubenkov c4623939af support override of the parametrized fixture on the test level
--HG--
branch : parametrized-fixture-override
2015-03-01 15:15:37 +01:00
Anatoly Bubenkov 060609317a allow to override parametrized fixtures with non-parametrized ones and vice versa
--HG--
branch : parametrized-fixture-override
2015-03-01 13:54:43 +01:00
Ronny Pfannschmidt 1e6e373913 Merged in issue616 (pull request #252)
fix issue616 - conftest visibility fixes.
2015-02-28 10:02:58 +01:00
holger krekel c3ca44b46f change links to go to the new pytest-dev bitbucket team's repo location
--HG--
branch : docs_community
2015-02-27 12:27:40 +01:00
holger krekel 660b84a052 Merged in cpcloud/pytest/ignore-doctest-import-errors (pull request #243)
Add option to ignore import errors in doctests
2015-02-26 21:59:54 +01:00
holger krekel d73e689991 fix issue616 - conftest visibility fixes. This is achieved by
refactoring how nodeid's are constructed.  They now are always
relative to the "common rootdir" of a test run which is determined by
finding a common ancestor of all testrun arguments.

--HG--
branch : issue616
2015-02-26 21:56:44 +01:00
Ronny Pfannschmidt 415c76b255 Merged in tush/pytest/junit-verbose-failures (pull request #240)
Made failure message in junit xml report more informative
2015-02-22 19:13:07 +01:00
Phillip Cloud f2ca0b8170 Add option to ignore import errors in doctests
--HG--
branch : ignore-doctest-import-errors
2015-02-08 01:25:23 -05:00
Dave Hunt 8f12269db7 Use shlex to split the arguments from PYTEST_ADDOPTS.
--HG--
branch : env-addopts
2015-01-26 10:39:21 +00:00