test_ok1/_pytest
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
..
_code merge master into features 2016-06-22 14:39:33 +02:00
assertion merge from master again 2016-06-22 16:03:52 +02:00
vendored_packages Fix spelling: explicitely --> explicitly 2015-12-01 01:41:47 -08:00
__init__.py merge master into features 2016-06-22 14:39:33 +02:00
_argcomplete.py Remove code related to support python <= 2.5 2015-12-16 16:16:22 -02:00
_pluggy.py Create `_pytest.vendored_packages` and _pytest._pluggy 2015-09-07 13:01:54 -03:00
cacheprovider.py Use testscollected to make xdist happy 2016-03-11 14:48:17 +06:00
capture.py Introduce pytest command as recommended entry point 2016-06-21 16:16:57 +02:00
config.py added check for already existing option names to OptionGroup.addoption() 2016-06-22 18:01:35 +02:00
doctest.py merge master into features 2016-06-22 14:39:33 +02:00
genscript.py Introduce pytest command as recommended entry point 2016-06-21 16:16:57 +02:00
helpconfig.py Introduce pytest command as recommended entry point 2016-06-21 16:16:57 +02:00
hookspec.py Introduce pytest command as recommended entry point 2016-06-21 16:16:57 +02:00
impl - enhance ordering of tests using parametrized resources 2012-08-01 09:07:32 +02:00
junitxml.py Merge branch 'master' into merge-master 2016-05-13 19:37:41 +02:00
main.py merge master into features 2016-06-22 14:39:33 +02:00
mark.py Always lstrip() keyword expression 2016-04-01 13:10:05 -04:00
monkeypatch.py monkeypatch: unnest handling code 2016-01-24 12:28:14 +01:00
nose.py adapt to pluggy naming, rename pytest.hookspec_opts to pytest.hookspec,s ame with hookimpl_opts 2015-05-06 10:08:08 +02:00
pastebin.py Fix pastebin when captured output contains non-ascii characters 2015-12-03 20:07:18 -02:00
pdb.py Merge branch 'master' into 'features' 2016-01-22 18:32:45 -02:00
pytester.py merge master into features 2016-06-22 14:39:33 +02:00
python.py Raise CollectError if pytest.skip() is called during collection 2016-06-24 20:56:21 +02:00
recwarn.py Moved py.code code over to py.test 2016-01-25 23:18:04 -02:00
resultlog.py Use os.path.isdir instead of os.path.exists 2015-06-17 08:08:03 -03:00
runner.py Comment a workaround for #1485. 2016-03-27 13:15:56 +03:00
skipping.py issue 1496 - xfail with condition keyword 2016-04-19 18:12:37 +01:00
standalonetemplate.py Introduce pytest command as recommended entry point 2016-06-21 16:16:57 +02:00
terminal.py Display collect progress only when in a terminal 2016-02-20 14:38:30 -02:00
tmpdir.py Make tmpdir resiliant to user ids that do not exist 2015-09-18 21:26:19 -04:00
unittest.py unittest.UnitTestCase: Allow __test__ for methods 2016-05-19 08:19:57 +05:30