Commit Graph

1117 Commits

Author SHA1 Message Date
Floris Bruynooghe 7f554f50e3 Fix collapse false to look at unescaped braces only
Sometimes the repr of an object can contain the "\n{" sequence which is
used as a formatting language, so they are escaped to "\\n{".  But the
collapse-false code needs to look for the real "\n{" token instead of
simply "{" as otherwise it may get unbalanced braces from the object's
repr (sometimes caused by the collapsing of long reprs by saferepr).

Fixes issue #731.

--HG--
branch : pytest-2.7
2015-04-30 02:31:12 +01:00
Bruno Oliveira 6fe5493c3c Fix py27-cxfreeze tox environment
Use a custom script to install a patched version of cx_freeze,
as required in Ubuntu 14.04 systems

--HG--
branch : cx_freeze_ubuntu
2015-04-22 19:46:06 -03: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 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
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 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 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 43e4fcf6dd Raise specific MarkerError rather than generic ValueError
--HG--
branch : issue463
2015-03-23 20:01:58 +01:00
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 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 a9b7de8bf0 address reviewer comments 2015-03-21 17:26:23 +01:00
Almar Klein 0fc75c9622 Storing sys.last_traceback: test, docs and changelog 2015-03-21 17:06:24 +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 d083153548 fix typo
--HG--
branch : parametrized-fixture-override
2015-03-02 20:18:06 +01:00
Ronny Pfannschmidt 41e6b04f0b Merged in eks/pytest/issue616 (pull request #258)
Add comments
2015-03-02 14:38:10 +01:00
Eric Siegerman 97d5da5c99 Add comments
--HG--
branch : issue616
2015-03-01 17:32:00 -05: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 28c2327f73 move conftest visibility tests and their setup into a class, accomodates @nicoddemus 's comment
--HG--
branch : issue616
2015-02-27 09:51:53 +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
Phillip Cloud c773ea664b Add test for command line usage
--HG--
branch : ignore-doctest-import-errors
2015-02-26 12:39:36 -05: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
Marc Abramowitz 777bde7c60 Remove xfail_if_pdbpp_installed from test_pdb.py
--HG--
branch : remove_pdbpp_xfail
2015-02-19 03:22:05 -08:00
Marc Abramowitz e19f3c260f Remove pdbpp xfails; don't seem necessary anymore
It seems that they're no longer necessary as the tests pass now

    [marca@marca-mac2 pytest]$ pip freeze
    backports.inspect==0.0.2
    fancycompleter==0.4
    funcsigs==0.2
    ordereddict==1.1
    -e hg+ssh://hg@bitbucket.org/antocuni/pdb@4bda65ac8f8cc9b1850e0301669aac39200f2f9a#egg=pdbpp-fix_pytest_doctest_NoneType_object_has_no_attribute_lower
    py==1.4.26
    Pygments==1.6
    pyrepl==0.8.4
    -e hg+ssh://hg@bitbucket.org/hpk42/pytest@5fc366c50b56a94638c959be8456d2cb3c7e7c1c#egg=pytest-dev
    wmctrl==0.1
    [marca@marca-mac2 pytest]$ py.test testing/test_doctest.py --tb=short
    ============================================================================= test session starts ==============================================================================
    platform darwin -- Python 2.7.9 -- py-1.4.26 -- pytest-2.7.0.dev1
    collected 22 items

    testing/test_doctest.py ......................

    ========================================================================== 22 passed in 1.61 seconds ===========================================================================

See https://bitbucket.org/antocuni/pdb/issue/24/doctests-fail-when-pdbpp-is-installed

--HG--
branch : remove_pdbpp_xfail
2015-02-19 03:03:56 -08:00
Dave Hunt 912c8f0540 Use monkeypatch to set the PYTEST_ADDOPTS environment variable in the test.
--HG--
branch : env-addopts
2015-01-29 10:52:01 +00:00
Dave Hunt 7325a5fe2e Support setting configuration using the PYTEST_ADDOPTS environment variable.
--HG--
branch : env-addopts
2015-01-23 20:09:42 +00:00
tush home 9f4d0be895 Failure message in junit xml report now are more informative
--HG--
branch : junit-verbose-failures
2015-01-20 01:45:26 +03:00
Ronny Pfannschmidt 5941b2e071 fix issue 655: crude workarounds around python2/3 exception leaks 2015-01-09 19:55:49 +01:00
TomV f6caf230f8 fix for issue615: _format_boolop must escape %
fix test for issue615: expression must eval False

--HG--
branch : format_boolop_percent6
2014-10-27 08:57:58 +00:00
holger krekel 5f2444d2a2 Merged in nicoddemus/pytest/fix-pastebin (pull request #228)
Fix --pastebin option
2014-10-23 09:08:30 +02:00
Bruno Oliveira 537dca477b Fixing --pastebin option by using a POST request instead of a XMLRPC call
fixes #614

--HG--
branch : fix-pastebin
2014-10-22 21:52:40 -02:00
Floris Bruynooghe 8d19ccb56f Merged in pfctdayelise/pytest/issue351 (pull request #161)
Fixes issue351: Add ability to specify parametrize ids as a
callable, to generate custom test ids. + tests, docs

Hg branch merge
2014-10-22 23:18:01 +01:00
Bruno Oliveira b928928942 added support for glob-style patterns to python_classes and python_functions config options
fixes #600

--HG--
branch : python-classes-glob
2014-10-16 19:27:10 -03:00
TomV f8623a6668 test for issue615: compound assert with percent
--HG--
branch : assert_percent_test
2014-10-13 09:26:18 +01:00
holger krekel cea9367739 Merged in HolgerPeters/pytest (pull request #221)
Make doctest flags configurable
2014-10-09 17:05:48 +02:00
holger krekel 8c91ffc701 some docs and refined semantics for wrappers 2014-10-09 12:21:01 +02:00
holger krekel c58770bfef re-scan methods during plugin register and unregister and not
during hook calling anymore.  Simplify register/getplugin api of PluginManager
2014-10-09 10:47:32 +02:00
holger krekel 5999368002 remove all occurences of "__multicall__" on hook impls in pytest/*.
also simplify pytest_runtest_markereport hook in _pytest/skipping.py
while touching the code anyway.
2014-10-08 20:23:40 +02:00
Holger Peters 787b0212d1 Add a doctest for module docstrings 2014-10-08 15:54:08 +02:00
Holger Peters f66e0825b2 Add configuration option for doctest flags 2014-10-08 14:31:17 +02:00
holger krekel c3d1986101 - refactor wrapped call support to also accomodate
pytest.mark.hookwrapper
- introduce a CallOutcome class to hold the result/excinfo status of
  calling a function.
- rename add_method_controller to add_method_wrapper
2014-10-08 11:27:14 +02:00
Floris Bruynooghe ab005a4261 Functional tests for id function
--HG--
branch : issue351
2014-10-08 00:11:32 +01:00
holger krekel b6e619413f merge pytest default 2014-10-07 18:11:15 +02:00