Commit Graph

1518 Commits

Author SHA1 Message Date
Ronny Pfannschmidt b9a91dc112 merge from master to features 2016-07-06 11:51:48 +02:00
Steffen Allner 6438895a23 Fix PEP-8. 2016-07-03 22:33:21 +02:00
Steffen Allner b650c3c118 Implement --setup-show cli flag
to also be able to see fixture setup with normal test execution.
2016-07-03 22:30:51 +02:00
Bruno Oliveira 58e558141d Remove commented out code 2016-06-26 21:19:07 +02:00
Bruno Oliveira 5891061ac1 Merge pull request #1675 from kvas-it/issue-1562
Add warning for assertions on tuples #1562
2016-06-26 16:09:15 -03:00
RedBeardCode 1b0dbd8c40 Move the freezing function from genscript.py to a new module freeze_support.py 2016-06-26 19:37:24 +02:00
RedBeardCode 0e2ebc96ff Remove deprecated cmd options
Fixes #1657
2016-06-26 19:26:04 +02:00
Vasily Kuznetsov c17027e576 Warn about asserts on tuples (fixes #1562) 2016-06-25 19:21:48 +02:00
RedBeardCode e2f550156e Improve of the test output for logical expression with brackets.
Fixes #925
2016-06-25 18:10:36 +02:00
Ted Xiao 856e6cab75 add --override-ini option to overrides ini values
Signed-off-by: Ted Xiao <xiao.xj@gmail.com>
2016-06-25 23:45:32 +08:00
holger krekel 13a188fe37 Merge pull request #1647 from sallner/features
Add new options to report fixture setup and teardown
2016-06-25 16:38:37 +02:00
Bruno Oliveira c519b9517a Merge pull request #1663 from aostr/master
Rename the default plugin "pdb" into "debugging"
2016-06-25 09:56:54 -03:00
Bruno Oliveira df17f862fa Merge pull request #1648 from blueyed/simplify-Argument-__repr__
Simplify Argument.__repr__
2016-06-25 09:26:50 -03:00
aostr 9a5224e2f8 Renamed the pdb module and changed unit tests accordingly 2016-06-25 12:37:31 +02:00
Danielle Jenkins da5c579d82 Move setupplan and setuponly options to their respective modules.
Also, changed their group from "general" to "debugconfig".
2016-06-25 12:20:56 +02:00
Danielle Jenkins 032ce8baf6 Switch setuponly and setupplan options to a hook-based implementation. 2016-06-25 12:19:46 +02:00
aostr 05b5554cac Renamed pytest pdb to debugging which conflicts with python pdb.
Combining multiple imports the "import pdb" imports the pytest module
as opposed to the python debugger.
2016-06-25 12:09:05 +02:00
Florian Bruhin 757f37f445 Don't ignore ImportError with setuptools plugins
This was added in b2d66b9e7b but is a bad
idea. When a plugin can't be imported, commandline options (optionally
set in pytest.ini) could be undefined, which means pytest bails out
much earlier before showing the warning, which is hard to debug.

Fixes #1479, also see #1307 and #1497
2016-06-25 09:56:22 +02:00
Daniel Hahler 939407ef63 Simplify Argument.__repr__
I have came across this when noticing that universal-ctags fails to parse
this correctly (https://github.com/universal-ctags/ctags/issues/997).
2016-06-25 09:31:31 +02:00
Omar Kohl d81f23009b Raise CollectError if pytest.skip() is called during collection
pytest.skip() must not be used at module level because it can easily be
misunderstood and used as a decorator instead of pytest.mark.skip, causing the
whole module to be skipped instead of just the test being decorated.

This is unexpected for users used to the @unittest.skip decorator and therefore
it is best to bail out with a clean error when it happens.

The pytest equivalent of @unittest.skip is @pytest.mark.skip .

Adapt existing tests that were actually relying on this behaviour and add a
test that explicitly test that collection fails.

fix #607
2016-06-24 20:56:21 +02:00
Tom Viner 77689eb486 Fixes #1503 no longer collapse false explanations 2016-06-24 15:35:24 +02:00
Tom Viner df9918eda3 issue1625, name getfuncargvalue to getfixturevalue 2016-06-24 10:08:19 +02:00
Vasily Kuznetsov c6af737d4e Fix fixture parameter display when ids is a function 2016-06-23 10:54:22 +02:00
Vasily Kuznetsov 1a5e530b98 Fix capturing with --setup-only/--setup-plan 2016-06-23 10:23:04 +02:00
Stefan Zimmermann 69bab4ab04 added check for already existing option names to OptionGroup.addoption() 2016-06-22 18:01:35 +02:00
Steffen Allner dd97a2e7c8 Merge from upstream 2016-06-22 17:51:48 +02:00
Vasily Kuznetsov 61992b4e22 Implement --setup-plan option 2016-06-22 16:45:36 +02:00
Ronny Pfannschmidt 18ef7de96b merge from master again 2016-06-22 16:03:52 +02:00
Vasily Kuznetsov 5e0d78f4f1 Fix .format string failures on python 2.6 2016-06-22 14:53:37 +02:00
Ronny Pfannschmidt 083f64100d merge master into features 2016-06-22 14:39:33 +02:00
Vasily Kuznetsov 2c5c4f3f78 Add printing of fixture dependencies 2016-06-22 12:54:36 +02:00
Steffen Allner 2c6cfa42fa Disable capturing for setuponly output 2016-06-22 12:14:35 +02:00
Steffen Allner de9ed5e3f4 Merge pull request #1 from kvas-it/features
Factor setuponly code out of runtestprotocol().
2016-06-22 12:04:45 +02:00
Steffen Allner 92bcc36266 Refactor logging of fixtures 2016-06-22 12:01:51 +02:00
Vasily Kuznetsov 6874c3a3cc Factor setuponly code out of runtestprotocol(). 2016-06-22 11:09:54 +02:00
Tom Viner 98adf204b2 issue 1553: Include terminal newlines in diffs 2016-06-22 09:50:15 +02:00
Steffen Allner 499c9551c8 Implement working version of --setuponly 2016-06-22 09:42:45 +02:00
Bruno Oliveira c3ee1c17bc Merge pull request #1620 from tomviner/issue460/parameterized-subrequest
Issue 460: Fail on getfuncargvalue(<fixture with params>)
2016-06-21 13:43:06 -03:00
Bruno Oliveira 4350f499b2 Merge branch 'issue1629' of https://github.com/davehunt/pytest into features 2016-06-21 18:37:14 +02:00
Bruno Oliveira 61ede096a3 Merge pull request #1631 from Avira/master
help the user in the rare case this assertion actually fails
2016-06-21 13:17:52 -03:00
Bruno Oliveira 573866bfad Merge remote-tracking branch 'upstream/features' into issue-1619-conftest-assert-rewrite 2016-06-21 18:10:19 +02:00
Dave Hunt ef9dd14963 Introduce pytest command as recommended entry point
Fixes #1629
2016-06-21 16:16:57 +02:00
Oliver Bestwalter 2b5c2f3ed5 help the user in the rare case this assertion actually fails 2016-06-21 14:57:48 +02:00
Omar Kohl ede7478dcc Exit pytest on collection error (without executing tests)
Add --continue-on-collection-errors option to restore the previous behaviour:
Execute tests (that were successfully collected) even when collection errors
happen.

Some tests had to be modified e.g. because the return code changed to 2
(EXIT_INTERRUPTED) instead of 1 (EXIT_TESTSFAILED) because an Interrupted
exception is raised on collection error.

Implemented via pair programming with:
    Oleg Pidsadnyi <oleg.pidsadnyi@gmail.com>

closes #1421
2016-06-21 13:32:34 +02:00
Bruno Oliveira 819942e964 Return explicit None from rewrite hook's find_module 2016-06-21 12:28:36 +02:00
Bruno Oliveira 8b0fb47c79 Remove print left by accident 2016-06-21 12:23:12 +02:00
Tom Viner 5854a71ece Issue 460: getfuncargvalue fixture w. params err 2016-06-21 11:29:21 +02:00
Floris Bruynooghe 9118c0222f Merge .set_config() into constructor 2016-06-21 09:28:10 +02:00
Daniel Hahler e53e45b55c tests: getexecutable: call `--version` on all Pythons
This should prevent errors from pyenv:

    pyenv: python2.6: command not found

    The `python2.6' command exists in these Python versions:
      2.6.9

While the pyenv wrapper explicitly returns 127, I think it is better to
just check for non-zero?!
2016-06-21 08:36:02 +02:00
Bruno Oliveira 3a81d2e012 conftest files now use assertion rewriting
Fix #1619
2016-06-20 23:13:29 +02:00