Commit Graph

1456 Commits

Author SHA1 Message Date
Bruno Oliveira 5afb61ad26 Fix trailing white-space 2015-12-25 17:51:55 -02:00
Bruno Oliveira 57bc14caa0 Apply readline workaround during initial conftest loading 2015-12-25 17:46:19 -02:00
Erik M. Bray 6e170a4a1c * Moved workaround to its own function, mostly for the sake of adding
a more descriptive docstring (the workaround itself is just to import
  readline earlier).  I removed the conditional on targetfd from the
  workaround since it doesn't really matter.

* Added # noqa marker.

* Added changelog entry, and self to authors.
2015-12-24 16:43:34 -05:00
Erik M. Bray 924a9667e1 Make sure readline has been imported before duping any stdio handles--otherwise pyreadline fails to connect to the correct handle for the console's stdout/in. 2015-12-24 14:56:57 -05:00
Bruno Oliveira 943099ddd1 Merge newinterpret into reinterpret.py 2015-12-16 18:31:43 -02:00
Bruno Oliveira 81588d7f63 Remove obsolete "oldinterpret" module 2015-12-16 16:16:22 -02:00
Bruno Oliveira af893aab26 Remove code related to support python <= 2.5
Fix #1226
2015-12-16 16:16:22 -02:00
Ronny Pfannschmidt 8bf7e7cc4b fixes #1259 - take finalized nodes out of the mapping
this allows double node id usage for file based items
2015-12-16 19:09:44 +01:00
Bruno Oliveira 2b2bec6b97 Remove experimental status from pytest_exception_interact 2015-12-16 14:29:39 -02:00
Bruno Oliveira 6ac31088c5 Merge branch 'master' into merge-master-into-features 2015-12-11 23:13:50 -02:00
Bruno Oliveira e87facfb22 Bump master to 2.8.6.dev1 2015-12-11 23:07:30 -02:00
Bruno Oliveira a124163425 Prepare for 2.8.5: bump version, CHANGELOG, announce 2015-12-11 19:20:07 -02:00
Bruno Oliveira 86b6ce5042 Merge remote-tracking branch 'upstream/master' into merge-master-into-features 2015-12-10 19:41:14 -02:00
Bruno Oliveira 8b61a332ba Merge remote-tracking branch 'bukzor/features-merge-master' into features 2015-12-10 19:03:55 -02:00
aselus-hub ec02f694ef Update python.py
updated dictionary itteration to create a list for generation, so that tests can be added in the generator functions under python3. This works fine as-is in python2 because python 2 already creates a list, whereas python3 returns an itterator. Forcing a list format for the return fixes python3 to work the same way as python2
2015-12-09 11:32:19 -08:00
Bruno Oliveira 1c46462991 Fix deprecated_call regression introduced in 2.8.4
Fix #1238
2015-12-08 22:40:05 -02:00
Buck Golemon eabf2f9091 Merge branch 'master' into features
Conflicts:
	AUTHORS
	_pytest/__init__.py
	_pytest/hookspec.py
	_pytest/recwarn.py
	testing/test_recwarn.py
2015-12-07 14:28:59 -08:00
David Vierra fbac936596 Add -rp and -rP options to report passing tests.
-rP is an alternative to `-s` for viewing the output of passing tests.
This causes the captured stdout/stderr of passing tests to be output in
the same way as that of failing tests.

-rp adds a simple one-line-per-test summary for passing tests.

Neither option is included by -ra.

Additional changes to `pytest_capturelog` and `pytest_catchlog` are
needed for this option to also output captured logs: They must be
changed to use `rep.sections.add` instead of `rep.longrepr.addsection`,
and to add these additional sections even if the test passes, since
passing tests don't seem to have a `longrepr` at report time.
2015-12-07 11:32:56 -10:00
Ronny Pfannschmidt 7b7737bf96 handle duplicate test ids via collection and xdist each reporting 2015-12-07 21:54:25 +01:00
Ronny Pfannschmidt 9ea7826427 Junitxml: correct node reporter attribute names 2015-12-07 21:54:25 +01:00
Ronny Pfannschmidt 09cc45b0c5 junitxml: correct docstring of make_properties_node 2015-12-07 21:54:25 +01:00
Ronny Pfannschmidt 0aa54101c9 junitxml: follow Bruno's attribute/method naming hint from the review 2015-12-07 21:54:25 +01:00
Ronny Pfannschmidt 518c88f149 finalize nodereporters by throwing away the intermediate xml nodes, fixes issue #1074 2015-12-07 21:54:25 +01:00
Ronny Pfannschmidt 5f5a7995b9 reintroduce junitxml report order and debug cleanups 2015-12-07 21:54:24 +01:00
Ronny Pfannschmidt 0528e5b45f junitxml: intermediate, move testcase generation to NodeReporter 2015-12-07 21:54:24 +01:00
Ronny Pfannschmidt 9b04958303 junitxml: keep track of custom property insert order
+ review: should we allow the same key multile times
2015-12-07 21:54:24 +01:00
Ronny Pfannschmidt faed54d6c7 junitxml: use node.warn to ensure fslocations 2015-12-07 21:54:24 +01:00
Ronny Pfannschmidt 1f609f96e6 junitxml: introduce nodereporter and track durations/properties there 2015-12-07 21:54:24 +01:00
Ronny Pfannschmidt 0664ae137c junitxml: remove debug print 2015-12-07 21:54:24 +01:00
Ronny Pfannschmidt d0107c898e junitxml restrucutre stat generation - use node tags 2015-12-07 21:54:24 +01:00
Ronny Pfannschmidt 2a31df072b junitxml: reverse the if/else logic for failure appending 2015-12-07 21:54:24 +01:00
Ronny Pfannschmidt 02f5defd89 yapf junitxml 2015-12-07 21:54:24 +01:00
Ronny Pfannschmidt c727860241 bump to 2.8.5.dev 2015-12-06 20:31:14 +01:00
Ronny Pfannschmidt a3353c49fd prepare release 2.8.4 - changelog updates + version bump 2015-12-06 16:13:55 +01:00
Bruno Oliveira 14bc3c4009 Fix pastebin when captured output contains non-ascii characters
Fix #1219
2015-12-03 20:07:18 -02:00
Bruno Oliveira a54e4e64cd Merge remote-tracking branch 'upstream/master' into pastebin-py3 2015-12-01 23:51:14 -02:00
Bruno Oliveira 6a2ebddc7c Decode urlopen response in pastebin
Fix #1198
2015-12-01 23:33:37 -02:00
Jeff Widman 6be6798cdf Fix spelling: explicitely --> explicitly 2015-12-01 01:41:47 -08:00
Florian Bruhin 0d2668017d Fix spelling mistake in #1207. 2015-11-30 17:33:34 +01:00
Florian Bruhin aba55a0fb2 Fix terminal output if no tests were run.
Before:
====  in 0.00 seconds ====

After:
==== no tests run in 0.00 seconds ====
2015-11-30 17:24:40 +01:00
Ronny Pfannschmidt b5d65e5139 Merge pull request #1206 from The-Compiler/collect-getattr
Don't collect classes with truthy __getattr__.
2015-11-30 17:23:47 +01:00
Florian Bruhin ba9146c131 Don't collect classes with truthy __getattr__.
When we have a metaclass which returns something truthy (like a method) in its
__getattr__, we collected the class because pytest thought its __test__
attribute was set to True.

We can work around this to some degree by assuming __test__ will always be set
to an explicit True if that's what the user has intended, and if it's something
other than that, this is probably a mistake.

Fixes #1204.
2015-11-30 16:41:13 +01:00
Florian Bruhin c790f7475e Fix getting line number with nasty __getattr__.
When an object has a custom __getattr__ which always returns a non-int, we
tried to get compat_co_firstlineno from it and checked it was a integer, which
caused an exception if such a class is mistakenly collected.

If we still mistakenly collect such a class (which is likely to be something
other than a test), we now skip it with a warning (because it probably has an
__init__) instead of producing an error.

See #1204.
2015-11-30 16:13:15 +01:00
mehdy 81ad1689b9 fix #1198 - removed docoding the result 2015-11-29 19:20:37 +03:30
mehdy 44f60ba141 fixed #1198 issue by encoding the unicode parameters to bytes and decoding the
bytes response to unicode
2015-11-29 18:27:05 +03:30
Bruno Oliveira 603d81ef2f deprecated_call now uses monkey patching strategy to capture warnings
similar to what we had in 2.7, with a few enhancements

Fix #1190
2015-11-26 16:48:58 -02:00
Bruno Oliveira 6378cdf7a9 Restored 2.7 implentation of deprecated_call 2015-11-26 15:54:57 -02:00
Bruno Oliveira b20803f0a6 Mention pytest_enter_pdb in the docs 2015-11-23 18:00:02 -02:00
Ronny Pfannschmidt df767cca8f Merge pull request #1188 from nicoddemus/pytest_enter_pdb
Pass pytest config object to pytest_enter_pdb
2015-11-23 20:55:33 +01:00
Bruno Oliveira b3166a538c Pass pytest's config object to pytest_enter_pdb 2015-11-23 14:42:21 -02:00
Bruno Oliveira 1f148a93ec Mention pytest_enter_pdb in the docs 2015-11-23 13:02:15 -02:00
Ronny Pfannschmidt af46ffe021 bump to 2.8.4.dev 2015-11-19 22:01:34 +01:00
Ronny Pfannschmidt 3dc57d99f2 Changelog groming and release preps for 2.8.3 2015-11-18 17:34:30 +01:00
Bruno Oliveira 7d6edb9ca5 Fix unittest.skip decorator test and separate the fix into a different, self-doc function 2015-11-04 19:54:18 -02:00
Lee Kamentsky 313050b15b Suggested edits by Bruno.
Moved fix to TestCaseFunction.setup. Added myself to AUTHORS and added entry to CHANGELOG
2015-11-04 15:30:16 -05:00
LeeKamentsky 8de2c035e2 Fixes #1169
The unittest.skip decorator runs @functools.wraps on self._testcase. functools.wraps expects a "__name__" attribute and this patch adds one. It might not be the correct fix, but it works for me.
2015-11-04 13:52:40 -05:00
Ronny Pfannschmidt 9013cb1b4c Merge pull request #1144 from The-Compiler/elcapitan-sip
Handle EPERM when writing rewritten bytecode.
2015-11-01 08:20:00 +01:00
Gabriel Reis f3f61fb5d1 Color highlight on the name of the failed tests 2015-10-28 08:12:57 +00:00
John Vandenberg 9a04879129 Remove commented out extrainit
Unused since 2012, and the docstring syntax is incorrect with
four quotes.
2015-10-20 21:08:21 +11:00
Florian Bruhin 2956627b8b Handle EPERM when writing rewritten bytecode.
Fixes #1143.
2015-10-17 11:55:55 +02:00
Bruno Oliveira 311b0a9683 Fix situation where a traceback entry "path" returns a str object
Fix #1133
2015-10-16 20:18:14 -03:00
Michael Birtwell a3bda59a30 collection: Prevent non-function callables from being collected
Fixes issue 331
previously to this change the collection code would issue a warning for
when ever it encountered a variable that looked like a test but wasn't a
function saying that it wouldn't collect it because it wasn't a function.
This fixes the logic so that if that warning is issued it really isn't
collected.
However previously special cases existed to support tests that were
created using functools.wraps and functools.partial. So the condition for
issuing that warning has been updated to take that in to account

Also try the old way of detecting functions just for proper integration
with mock.path in python 2.7 the get_real_func returned the unbound method
2015-10-12 22:23:18 +01:00
Ronny Pfannschmidt db077555f6 Merge pull request #1102 from nicoddemus/doctest-fixtures-fix
Fix autouse fixtures and doctest modules
2015-10-10 14:21:53 +02:00
TomV 88c8dd96f9 issue1035 Override inspect.isclass for python 2.6 2015-10-09 19:44:47 +01:00
Buck Golemon 0e55a8793f all tests pass 2015-10-09 09:58:12 -07:00
Buck Golemon 49d46a0059 an ugly patch to fix all but the most important part =/ 2015-10-08 10:44:58 -07:00
Florian Bruhin b5b53b6aec start 2.8.3 development 2015-10-07 17:56:05 +02:00
Florian Bruhin 7c529e0afe Merge branch '2.8.2-release' 2015-10-07 17:51:34 +02:00
Florian Bruhin 42937d4bb6 Prepare 2.8.2 release. 2015-10-06 21:06:25 +02:00
Demian Brecht 493530ec6d typo fix, changed position of context manager notes 2015-10-05 12:13:25 -07:00
Bruno Oliveira a14c77aeba Fix problems when mixing autouse fixtures and doctest modules
The main problem was that previously DoctestModule was setting
up its fixtures during collection, instead of letting
each DoctestItem make its own fixture setup

Fix #1100
Fix #1057
2015-10-03 16:07:14 -03:00
Michael Aquilina df874db817 Update default reason to "unconditional skip" 2015-10-03 17:02:18 +01:00
Michael Aquilina 25d74a5919 Dont explicitly inherit from object 2015-10-03 16:55:04 +01:00
Michael Aquilina 213dbe7a5f newlines 2015-10-03 16:42:15 +01:00
Michael Aquilina 9e57954b03 First argument in pytest.mark.skip is a reason 2015-10-03 16:42:15 +01:00
Michael Aquilina eee24138b0 Fix failing test 2015-10-03 16:42:15 +01:00
Michael Aquilina 04545f8a54 classes inherit from object 2015-10-03 16:42:15 +01:00
Michael Aquilina ad0b8e31b8 Fix case where skip is assigned to as an attribute directly 2015-10-03 16:42:14 +01:00
Michael Aquilina b71add27da Add MarkEvaluator for skip 2015-10-03 16:42:14 +01:00
Bruno Oliveira 5171d167ce Move "note" to the end of the main text
Fix #1097
2015-10-02 18:14:17 -03:00
Demian Brecht 2981bece55 pyflakes fix 2015-10-02 13:03:43 -07:00
Demian Brecht fd211bf490 Add a note about usage of the context manager
Addesses #1097
2015-10-02 12:40:58 -07:00
holger krekel 88209c6ac6 Merge pull request #1092 from nicoddemus/param-ids-fix
Param ids fix
2015-10-01 15:09:11 +02:00
Ronny Pfannschmidt 688f955f5e Merge pull request #1058 from nicoddemus/doc-how-disable-cache
Add docs on how to disable cache provider
2015-10-01 13:06:02 +02:00
Bruno Oliveira f3cee8f0b5 Merge remote-tracking branch 'upstream/master' into param-ids-fix 2015-10-01 07:58:55 -03:00
Ronny Pfannschmidt b7fd3f0031 Merge pull request #1093 from nicoddemus/relto-bug
Fix internal error when filtering tracebacks where one entry was generated by an exec() statement
Fixes #995
2015-10-01 06:00:40 +02:00
Bruno Oliveira d1e00f6e19 Detect dynamic code explicitly in filter_traceback 2015-09-30 17:32:49 -03:00
Bruno Oliveira c9480c5b8b Move imports outside _escape_bytes as suggested in review 2015-09-30 17:02:19 -03:00
Bruno Oliveira a808e09204 fix docstring for cache fixture regarding ``/`` on keys 2015-09-30 00:27:52 -03:00
Bruno Oliveira 11f100813e Fix internal error when filtering tracebacks where one entry was generated by an exec() statement
Fix #995
2015-09-29 22:29:43 -03:00
Bruno Oliveira b64470443f Fix SystemError when using unicode_escape on Python 3
Fix #1087
2015-09-29 18:20:30 -03:00
Bruno Oliveira 8633c4cefd Fix encoding errors for parametrized tests with unicode parameters in py2
Fix #1085
2015-09-29 17:57:49 -03:00
holger krekel cb58eaa611 Merge remote-tracking branch 'upstream/master' into features
Conflicts:
	_pytest/__init__.py
	testing/test_recwarn.py
2015-09-29 15:56:41 +02:00
holger krekel c5fd42b699 start 2.8.2 development 2015-09-29 15:32:33 +02:00
holger krekel 95245b935c - fix a flaky test on py35-xdist by calling
importlib.invalidate_caches()

- bump version to 2.8.1

- regen docs

- amend changelog, authors
2015-09-29 13:10:59 +02:00
holger krekel f61f39efdd Merge pull request #1052 from The-Compiler/no-std-prefix
Don't hardcode 'std' for captured stdout/stderr.
2015-09-29 09:19:40 +02:00
holger krekel a73d517bee Merge pull request #1080 from vodik/master
fix #1034: Add missing nodeid on pytest_logwarning call in addhook.  Thanks Simon Gomizelj for the PR.
2015-09-29 09:07:43 +02:00
Simon Gomizelj b3727438d6 Add missing nodeid on pytest_logwarning call in addhook.
Otherwise KeyError: 'nodeid' gets thrown, killing pytest. This may fix
issue 1034, but the details of it may be caused by something similar
somewhere else.
2015-09-28 20:23:54 -04:00
Bruno Oliveira b184f391c6 Show known environment variables in py.test --help 2015-09-28 18:34:16 -03:00
Bruno Oliveira 5f860181b6 Remove print left by accident 2015-09-28 18:25:20 -03:00
Eric Hunsberger e8261e0c77 `deprecated_call` detects pending warnings again
`deprecated_call` now looks for PendingDeprecationWarnings,
as it did previously but was broken by #897. Fixes #1037.

Also added a test so this does not happen again.
2015-09-28 12:11:52 -04:00
holger krekel 971ebcbd77 simplify by removing the single-call "exclude_pytest_names" function 2015-09-28 15:43:55 +02:00
holger krekel 1c0ffc5caf seems like pypy's callable builtin calls __getattr__ so we do the check
later.
2015-09-28 14:02:30 +02:00
holger krekel 4e3a807733 fix issue #1073 -- shortcut plugin hook lookup if the attrname is not
prefixed with pytest_.
2015-09-28 13:34:28 +02:00
Bruno Oliveira 910b25d416 Vendor pluggy-0.3.1
Fix #704
2015-09-27 16:04:29 -03:00
holger krekel 0c05ca1fd5 Merge branch 'master' into features 2015-09-26 10:03:42 +02:00
Bruno Oliveira 748da0e5d7 Fix xml generation when used with pytest-xdist
pytest_runtest_logreport must be careful to not depend on setup/call/teardown
being called sequentially in that order, as xdist will call them as they are reported
from the slaves

Fix #1064
2015-09-26 03:21:24 -03:00
holger krekel 4867554eec Merge branch 'master' into features 2015-09-23 16:42:42 +02:00
Ronny Pfannschmidt a3fdcd9b17 Merge pull request #1031 from pytest-dev/unmarshable-parametrize
Parametrized values containing non-ascii bytes break cache
2015-09-23 09:03:51 +02:00
Ronny Pfannschmidt e5c76cb22d Merge pull request #1054 from nicoddemus/cache-fixture-docstring
Add docstring to cache fixture
2015-09-23 09:00:01 +02:00
Bruno Oliveira 79ebca3f30 (w)warnings -> (w)pytest-warnings in "-r chars" help 2015-09-23 01:09:09 -03:00
Bruno Oliveira 25d2cc4604 Add docstring to cache fixture
Fixes #1049
2015-09-22 23:46:05 -03:00
Bruno Oliveira e1063678f1 escape bytes when creating ids for parametrized values 2015-09-22 23:18:09 -03:00
Bruno Oliveira 9d1ae0a149 Merge pull request #1048 from RonnyPfannschmidt/pytest-1029
fixes #1029 by handling access errors for cache dirs as pytest warning
2015-09-22 19:04:04 -03:00
Florian Bruhin c10f483b9f Don't hardcode 'std' for captured stdout/stderr.
This will make Item.add_report_sect more usable for plugins.
See https://github.com/eisensheng/pytest-catchlog/pull/7
2015-09-22 20:29:16 +02:00
Ronny Pfannschmidt ea9a491fb3 add an acceptance test for cache write errors 2015-09-22 20:24:37 +02:00
holger krekel ca460e11e6 Merge pull request #1051 from Akasurde/issue_1027
Added minor documentation change in python.py
2015-09-22 17:09:25 +02:00
Abhijeet Kasurde dc1ce51ac2 Added minor documentation change
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2015-09-22 20:15:49 +05:30
Ronny Pfannschmidt 29f4da93d4 handle access errors when writing cache files silently as pytest warning, fixes #1039 2015-09-22 16:28:19 +02:00
Ronny Pfannschmidt 36924b59bd Merge branch '653-deprecated-context-manager' of https://github.com/chiller/pytest into features 2015-09-22 15:14:06 +02:00
holger krekel 48df2f6842 Merge branch 'master' into features 2015-09-22 11:23:05 +02:00
holger krekel 41d61ed221 Merge pull request #1023 from RonnyPfannschmidt/fix-877
Fix 877
2015-09-22 11:17:02 +02:00
holger krekel 97f7815feb also change pytest version to target 2.9.0 2015-09-22 11:01:33 +02:00
holger krekel e2f72ffed8 start bugfix changelog on master 2015-09-22 10:59:23 +02:00
Galaczi Endre 9f77a8507e removed mutation of global state, changed filter addition in WarningsRecorder 2015-09-21 19:01:23 +01:00
Galaczi Endre beaa8e55bd Fixes #653 use deprecated_call as context_manager 2015-09-21 19:01:23 +01:00
Floris Bruynooghe 80897f62a6 Merge pull request #974 from nicoddemus/addoption-conftest
Add warning about implementing pytest_addoption in conftest files
2015-09-21 11:28:31 +01:00
Andy Freeland b1c9b8b415 Make tmpdir resiliant to user ids that do not exist
Previously, the tmpdir fixture would fail if the current process's user
id does not correspond to a valid user (e.g. running pytest in a Docker
container with 'docker run -u').
2015-09-18 21:26:19 -04:00
Ronny Pfannschmidt 7658f60146 #877 - reencoding causes typeerrors on python2 2015-09-19 00:30:01 +02:00
Ronny Pfannschmidt 49c99a41ea reencode non-ascii python2 assertion reprs, fixes #877
i decided against using a warning since the problem goes away with python3
the support code can be removed once we drop python2 in 10 years or so
2015-09-19 00:30:01 +02:00
Bruno Oliveira f02d9425f9 Bump version to 2.8.0 2015-09-18 19:04:20 -03:00
Ronny Pfannschmidt 1aca998f3f Merge pull request #1012 from lukas-bednar/junitxml_plugin
junitxml: align custom properties with junit format
2015-09-18 16:01:22 +02:00
Lukas Bednar 02a2272cfe junitxml: move custom properties to properties element
<testsuite>
  <testcase>
    <properties>
      <property name="ABC" value="XYZ" />
      <property name="DEF" value="ZYX" />
    </properties>
  </testcase>
</testsuite>
2015-09-17 15:56:41 +02:00
Florian Bruhin fe8def98e4 Merge pull request #1020 from hpk42/pluggy031
re-vendor pluggy to 0.3.1 release and also fix the README
2015-09-17 14:41:32 +02:00
holger krekel f4bfd571ee re-vendor pluggy to 0.3.1 release and also fix the README 2015-09-17 13:54:23 +02:00
holger krekel baf5b5d005 update changelog/author info, bump version number 2015-09-17 13:43:39 +02:00
holger krekel (rather uses bitbucket/hpk42) 3bcda48ba4 Merge pull request #1009 from mdboom/deprecation-warnings
avoid deprecation warnings, introduce helpers.
2015-09-17 13:37:26 +02:00
holger krekel 7eb1211192 revert setuptools_scm addition introduced with f22d14b105 2015-09-17 12:58:04 +02:00
Florian Bruhin f978b545c5 Merge pull request #1016 from hpk42/importappend3
revert importing test module behaviour to prepend by default
2015-09-17 12:41:28 +02:00
holger krekel 6192e74f03 remove __init__.py as advised by ronny 2015-09-17 10:51:03 +02:00
holger krekel a62d12634c revert importing test module behaviour to prepend by default 2015-09-16 22:12:20 +02:00
holger krekel (rather uses bitbucket/hpk42) 886ac82c43 Merge pull request #1013 from nicoddemus/issue1010
Make tmpdir more resilient in case environment variables required by getpass are missing
2015-09-16 21:57:44 +02:00
Florian Bruhin 2575053697 Merge pull request #1015 from hpk42/cache-integration
refined pytest-cache integration
2015-09-16 21:46:46 +02:00
Bruno Oliveira 130e6cf8a2 Use temproot as a fallback if the current user couldn't be obtained 2015-09-16 16:42:07 -03:00
holger krekel 45065e4e2e refine command line option naming and docs 2015-09-16 20:41:22 +02:00
Bruno Oliveira 1150e87e31 Extract get_user logic into a separate function 2015-09-16 12:47:50 -03:00
Bruno Oliveira 6676aeda5a Make tmpdir more resilient in case environment variables required by getpass are missing
Fix #1010
2015-09-16 12:20:07 -03:00
Michael Droettboom bf74401fd3 Use __code__.co_argcount 2015-09-16 11:05:54 -04:00
Michael Droettboom 08a572086b Fix lookup of special values 2015-09-16 11:02:36 -04:00
Michael Droettboom 9c19728d2b Fix checking for args 2015-09-16 06:45:51 -04:00
Michael Droettboom 859259ddae Simplify 2015-09-16 06:43:16 -04:00
Michael Droettboom a0cefb3213 Use inspect.signature instead of inspect.getargspec 2015-09-16 06:33:53 -04:00
holger krekel fdd23878ec Merge latest changes from branch 'pytest-2.7'
Conflicts:
	_pytest/__init__.py
	doc/en/fixture.rst
	setup.cfg
	testing/test_runner.py
2015-09-16 09:26:55 +02:00
holger krekel 5af262daa3 fix flakes problem, configure devpi upload to always upload wheels and sdist 2015-09-15 12:28:09 +02:00
holger krekel 16720b96b4 fix a few issues with pytest-2.7 branch and bump version number
- importorskip: skip a test if we have a minversion but cannot parse
  version numbers due to pkg_resources not present
- make runner tests work with latest xdist
2015-09-15 12:17:52 +02:00
Bruno Oliveira b2b003dcac Merge pull request #1001 from RonnyPfannschmidt/exitcode-refactor
restrucure pytest.main.wrap_session to allow for non-testrun wraps
2015-09-14 15:56:04 -03:00
Ronny Pfannschmidt 81018f1996 restrucure pytest.main.wrap_session to allow for non-testrun wraps 2015-09-14 18:34:29 +02:00
Bruno Oliveira a13f23d218 Merge branch 'master' into vendor-pluggy 2015-09-14 12:22:18 -03:00
Ronny Pfannschmidt 2cfc183029 monkeypatch: ensure the internal _savesyspath attribute always exists 2015-09-14 07:42:23 +02:00
Ronny Pfannschmidt e0645564fe more pep8 fixes 2015-09-13 21:49:01 +02:00
Ronny Pfannschmidt 1e107e6bd1 restrucure pytest.main.wrap_session to allow for non-testrun wraps 2015-09-13 19:55:44 +02:00
Ronny Pfannschmidt 2e87cf4a62 create the previously missing cache fixture
there was a disabled test
2015-09-13 19:55:44 +02:00
Ronny Pfannschmidt e035f57535 s/--cache/--show-cache/ 2015-09-13 19:55:44 +02:00
Ronny Pfannschmidt e20216a1a8 merge the pytest-cache plugin into core 2015-09-13 19:55:44 +02:00
Bruno Oliveira 41d2faccea Merge branch 'issue_960' of https://github.com/Akasurde/pytest 2015-09-12 10:57:23 -03:00
Abhijeet Kasurde dd69394598 Added testcase and help for report option
Fix added to show help of new reporting option 'a'.
Also, added testcase for checking reporting functionality
with option 'a'.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2015-09-11 12:24:45 +05:30
Abhijeet Kasurde c40947e651 Added fix for specifying every option for reporting
The fix will add option 'a' to reporting which will ease task of
adding all options or reporting at once.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2015-09-10 15:43:43 +05:30
Bruno Oliveira b6f876e721 Fix --target parameter for pip install 2015-09-07 14:13:41 -03:00
Bruno Oliveira 5a1c679f78 Keep *dist-info directory on vendored_packages 2015-09-07 14:09:59 -03:00
Bruno Oliveira 0b3f1b4a7c Create `_pytest.vendored_packages` and _pytest._pluggy
- Replace imports from "pluggy" to "_pytest._pluggy"
- Fallback to import "pluggy" from global namespace if
  not found in _pytest.vendored_packges
2015-09-07 13:01:54 -03:00
Bruno Oliveira 8625eb643e Merge pull request #986 from RonnyPfannschmidt/early-logging
replay initial warnings when terminalreporter is loaded
2015-09-02 19:10:53 -03:00
Ronny Pfannschmidt 76f0988551 turn the pytest_logwarning hook historic 2015-09-02 18:49:49 +02:00
Ronny Pfannschmidt 348e519437 Merge pull request #962 from nicoddemus/doctest-skip
Make doctest SKIP option register doctests as SKIPPED rather than PASSED
2015-09-01 12:31:35 +02:00
Ronny Pfannschmidt 7292212d5a Merge pull request #976 from nicoddemus/ren-warnings-on-terminal
Rename "warnings" to "pytest-warnings" in terminal output
2015-09-01 07:56:42 +02:00
Bruno Oliveira 4ad56e84a8 Make doctest SKIP option register doctests as SKIPPED rather than PASSED
Fix 957
2015-08-31 21:25:11 -03:00
Bruno Oliveira 06a70b6d6d Merge pull request #982 from codewarrior0/patch-1
Add notes to docstring of `monkeypatch.undo()`
2015-08-31 21:18:53 -03:00
Ronny Pfannschmidt 3fa261564b replay initial warnings when terminalreporter is loaded 2015-08-31 21:54:12 +02:00
Florian Bruhin 885e461ae3 Fix overriding of fixtures with parametrization.
Fixes #979, see #926.
2015-08-31 14:38:39 +02:00
David Vierra 3a27cd87ce Adjust phrasing in monkeypatch.undo docstring
s/test invocation/test function invocation/
2015-08-29 19:00:00 -10:00
David Vierra 6380e19f07 Add notes to docstring of `monkeypatch.undo()`
Note that calling `undo()` is generally not needed, and describe the "gotcha" discovered in #981.
2015-08-29 16:53:57 -10:00
Bruno Oliveira c0eec5d61c Merge pull request #975 from nicoddemus/fix-regression-parse-known-args
Fix regression caused by changing the signature for parse_known_args
2015-08-29 23:44:32 -03:00
Brianna Laugher c493f263b6 Merge branch 'Elizaveta239-master' closes #908 2015-08-29 17:34:35 +10:00
Bruno Oliveira dd7112d5ea Show a few diff lines when truncating string diffs
Fix #934
2015-08-27 22:20:13 -03:00
Bruno Oliveira e59471766a Rename "warnings" to "pytest-warnings" in terminal output
Fix #970
2015-08-27 19:59:52 -03:00
Bruno Oliveira 4533a50542 Fix regression caused by changing the signature for parse_known_args
Fix #973
2015-08-27 19:35:32 -03:00
Bruno Oliveira ccf7584fac Add warning about implementing pytest_addoption from conftest files 2015-08-27 19:14:56 -03:00
Bruno Oliveira 42b43a7d7b Paths after normal options are now properly used to discover rootdir and ini files
Fix #949
2015-08-25 22:08:05 -03:00
elizabeth e67d66a5d4 Merge branch 'pytest-dev'
# Conflicts:
#	AUTHORS
2015-08-24 22:55:11 +03:00
Ronny Pfannschmidt b25e41e348 Merge pull request #956 from nicoddemus/record-xml-property
add preliminary support for extended junit xml properties
2015-08-24 09:13:04 +02:00
Bruno Oliveira 70da93145d Improve docs and using warning system for record_xml_property fixture 2015-08-23 11:56:27 -03:00
elizabeth 06585f5bdd Always report error about parametrize data that doesn't correspond to fixtures in test functions. 2015-08-23 13:42:40 +03:00
David Diaz 2ddbac1f98 Correcting implementation based on pull request feed back 2015-08-21 14:31:53 -06:00
Ronny Pfannschmidt 287df16c9c Merge pull request #817 from nicoddemus/non-collection-exit-error
return non-zero exit code if no tests are collected
2015-08-21 18:30:57 +02:00
David Diaz 24212fd97f Add support to record custom properties on xml output 2015-08-20 17:55:38 -06:00
Bruno Oliveira f730291904 Make testsfailed and testscollected public Session attributes
As suggested by @flub in review
2015-08-18 07:35:02 -03:00
Bruno Oliveira 2ffd37b816 return non-zero exit code if no tests are collected
Fix #812
Fix #500
2015-08-18 07:35:02 -03:00
Ronny Pfannschmidt 7758bcd141 terminalwriter: extract plugin printing logic and add positive unittests 2015-08-17 09:10:01 +02:00
Ronny Pfannschmidt 740a97a8cc terinalwriter: use dash between plugin name and version 2015-08-17 08:48:38 +02:00
Ronny Pfannschmidt 2c42f15e00 adapt plugin printing
* print each distribution only once(xdist now has 3 entrypoints)
* include the distribution version
2015-08-17 08:41:24 +02:00
Ronny Pfannschmidt 37ed391cc2 Merge pull request #938 from nicoddemus/doctest-unicode
New ALLOW_UNICODE doctest option
2015-08-16 11:35:10 +02:00