holger krekel
31576fac61
fix issue380 by making --resultlog only rely on longrepr instead
...
of the "reprcrash" attribute which only exists sometimes.
2013-11-19 14:19:29 +01:00
Ronny Pfannschmidt
82846777a7
add missing importorskip
2013-11-19 12:21:47 +01:00
holger krekel
7f49e0fddc
xfail a test on pypy that checks wrong encoding/ascii (pypy does
...
not error out). fixes issue385.
also re-enable pypy tests in tox.
2013-11-19 11:18:51 +01:00
Ronny Pfannschmidt
eda8b02a8d
fix issue384 by removing the trial support code
2013-11-19 10:58:24 +01:00
holger krekel
1fd1617427
fix pexpect-3.0 compatibility for pytest's own tests.
...
(fixes issue386)
2013-11-19 10:10:27 +01:00
holger krekel
581b3a110c
Merged in hsoft/pytest (pull request #81 )
...
Fix TypeError crash on failed imports under py3.3.
2013-11-15 21:02:30 +01:00
Virgil Dupras
e118682db1
Added test for previous crash on failed import fix
...
Also, rewrote the fix a bit.
ref #383 .
2013-11-15 14:03:57 -05:00
holger krekel
fde947e1a8
Merged in paylogic/pytest/ignore-autocomplete-on-darwin (pull request #84 )
...
ignore argcomplete on darwin
2013-11-13 07:44:24 +01:00
holger krekel
ce0af892aa
Merged in paylogic/pytest/multi-level-fixture-deps-override (pull request #83 )
...
When overridden, fixture's dependencies are called from all levels of folder structure
2013-11-13 07:43:59 +01:00
Anatoly Bubenkov
ba5d4ae42f
ignore argcomplete on darwin
...
--HG--
branch : ignore-autocomplete-on-darwin
2013-11-12 13:52:16 +01:00
Anatoly Bubenkov
d18124f5ed
support python32
...
--HG--
branch : python32-test-fix
2013-11-12 13:48:17 +01:00
Anatoly Bubenkov
846cf781a1
use deepest fixturedef for fixture closure
...
--HG--
branch : multi-level-fixture-deps-override
2013-11-12 13:45:36 +01:00
James Lan
7210e443ee
Support multiple marks for individual parametrized argument set
...
--HG--
branch : multi-marks
2013-11-01 21:10:13 -07:00
holger krekel
75328b66e6
fix tests on py32/py33
2013-10-22 11:26:29 +02:00
holger krekel
cf9d345382
fix unicode handling with junitxml, fixes issue368.
2013-10-21 16:54:25 +02:00
holger krekel
0d8392bc45
fix unicode handling with new monkeypatch.setattr(import_path, value)
...
API. Thanks Rob Dennis. Fixes issue371.
2013-10-21 14:01:02 +02:00
holger krekel
bc8c4b3ebd
pytestconfig is now session-config as it is the same object during the
...
whole test run. Fixes issue370
2013-10-21 13:33:36 +02:00
holger krekel
8ac5af2896
fix flakes issues and make --flakes run part of tox runs
2013-10-12 15:39:22 +02:00
holger krekel
d81b703f10
avoid one surprising case of marker malfunction/confusion::
...
@pytest.mark.some(lambda arg: ...)
def test_function():
would not work correctly because pytest assumes @pytest.mark.some
gets a function to be decorated already. We now at least detect if this
arg is an lambda and thus the example will work. Thanks Alex Gaynor
for bringing it up.
2013-10-11 14:36:54 +02:00
holger krekel
124e58e42d
merge
2013-10-11 09:30:08 +02:00
Jason R. Coombs
2697b63bcd
Fix bytes/string mismatch in test on Python 3
2013-10-10 18:01:56 -04:00
Jason R. Coombs
00c0d62c9b
Adding test capturing #366 where an error occurs when package resources are loaded from the test package.
2013-10-10 11:40:31 -04:00
holger krekel
a5d4c20905
make "--runxfail" turn imperative pytest.xfail calls into no ops
...
(it already did neutralize pytest.mark.xfail markers)
2013-10-09 22:55:20 +02:00
Benjamin Peterson
8b6e42317b
add test for detecting coding cookie with CRLF newlines
2013-10-05 15:20:32 -04:00
Benjamin Peterson
56e6ae567c
fix detection of the coding cookie when it is on the second line of the file ( fixes #330 )
2013-10-05 15:16:08 -04:00
Benjamin Peterson
33b663e03d
fix coding cookie detection logic
2013-10-05 15:03:04 -04:00
holger krekel
cec7d47c1f
remove fd-fixing attempt at startup of pytest. It's
...
not clear it's actually needed and it's not nice
to still do FD-dupping when "-s" is specified.
2013-10-03 18:53:40 +02:00
holger krekel
5aa5b9748d
fix argcomplete-test to use sys.argv[0] if it looks like a py.test executable
2013-10-03 18:02:54 +02:00
holger krekel
ae090740c5
always dupfile if os.dup is available
2013-10-03 16:47:55 +02:00
holger krekel
2248a31a44
more fixes regarding marking, in particular plugins should use add_marker/get_marker now.
2013-10-03 15:43:56 +02:00
holger krekel
9fdfa155fb
fix issue354: avoid tmpdir fixture to create too long filenames especially
...
when parametrization is used
2013-10-03 14:22:54 +02:00
holger krekel
e49eca8d59
simplify the implementation of NodeKeywords getting rid of __ descriptors appearing there.
2013-10-03 13:53:22 +02:00
holger krekel
d3c9927fee
fix regression reported by dstufft: regression when a 1-tuple ("arg",) is used
...
for specifying parametrization (the values of the parametrization were passed
nested in a tuple).
2013-10-02 08:08:26 +02:00
Floris Bruynooghe
1db6fc87c7
Allow unicode strings in parser.add_argument()
...
This fixes issue360 by also converting unicode strings to the argparse
syntax instead of just native strings.
2013-10-01 13:20:20 +01:00
holger krekel
d226b2faf4
release announcement, bump version numbers, some test adapatations because of random win32 test failures.
2013-10-01 12:37:11 +02:00
holger krekel
2c7d00579b
bump version, some windows test fixes, prevent logging from raising exceptions at the end (finally), add py25 to tox.ini.
2013-09-30 16:09:26 +02:00
holger krekel
de35b077a2
disallow yield in non-yield-fixtures for now. This is an incompataibility but we want to prepare for possibly merging fixture and yield_fixture some day.
2013-09-30 13:56:54 +02:00
holger krekel
086d4e4ced
strike keyword argument in favour of new pytest.yield_fixture decorator
2013-09-30 13:42:39 +02:00
holger krekel
db6f347db6
fix issue358 -- introduce new pytest_load_initial_conftests hook and make capturing initialization use it, relying on a new (somewhat internal) parser.parse_known_args() method.
...
This also addresses issue359 -- plugins like pytest-django could implement a pytest_load_initial_conftests hook like the capture plugin.
2013-09-30 13:14:16 +02:00
holger krekel
4b709037ab
some more separation of core pluginmanager from pytest specific functionality.
...
Idea is to have the PluginManager be re-useable from other projects at some point.
2013-09-30 13:14:14 +02:00
holger krekel
d946299b0a
shift pytest_configure/unconfigure/addoption/namespace hook calling to config object.
...
The _pytest.config module itself is no longer a plugin but the actual
config instance is plugin-registered as ``pytestconfig``.
This allows to put most pytest specific logic to _pytest.config instead
of in the core pluginmanager.
2013-09-30 13:14:14 +02:00
holger krekel
8b1e53f6d3
avoid creation of file in os.getcwd() cc avanderneut
2013-09-30 08:36:31 +02:00
holger krekel
a930f44e60
introduce pluginmanager.ensure_teardown() which allows
2013-09-28 22:23:00 +02:00
holger krekel
fad7bd4393
simplify Config constructor
2013-09-28 22:22:53 +02:00
holger krekel
b80e875525
move FILE_OR_DIR constant out
2013-09-28 09:52:41 +02:00
holger krekel
1fc466e8ac
add terminalreporter.section|line methods to print extra information.
2013-09-27 15:48:03 +02:00
holger krekel
39503932a4
merge monkeypatch.replace into monkeypatch.setattr, also support monkeypatch.delattr.
2013-09-27 12:33:06 +02:00
holger krekel
da7133d201
fix some tests wrt to expecting output now that pytest does no
...
introduce unwanted "buffering" on "-s" calls.
2013-09-27 12:28:34 +02:00
holger krekel
030c337c68
don't manipulate FDs at all if output capturing is turned off.
2013-09-27 09:49:39 +02:00
holger krekel
3ab9b48782
introduce yieldctx=True in the @pytest.fixture decorator. Refactor tests and docs.
2013-09-26 12:57:21 +02:00