[py-svn] commit/pytest: hpk42: fixing links for 2.3 release, and fixing a windows32 failure on py3
Bitbucket
commits-noreply at bitbucket.org
Fri Oct 19 10:53:46 CEST 2012
1 new commit in pytest:
https://bitbucket.org/hpk42/pytest/changeset/c83169fe80e8/
changeset: c83169fe80e8
user: hpk42
date: 2012-10-19 10:53:28
summary: fixing links for 2.3 release, and fixing a windows32 failure on py3
affected #: 21 files
diff -r 72ae4efeefa55befefa2e0bbbc45586e807c4c6d -r c83169fe80e8ad641542727745a0bd4847f34c3a CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,4 @@
-Changes between 2.2.4 and 2.3.0.dev
+Changes between 2.2.4 and 2.3.0
-----------------------------------
- fix issue202 - better automatic names for parametrized test functions
diff -r 72ae4efeefa55befefa2e0bbbc45586e807c4c6d -r c83169fe80e8ad641542727745a0bd4847f34c3a _pytest/__init__.py
--- a/_pytest/__init__.py
+++ b/_pytest/__init__.py
@@ -1,2 +1,2 @@
#
-__version__ = '2.3.0.dev33'
+__version__ = '2.3.0'
diff -r 72ae4efeefa55befefa2e0bbbc45586e807c4c6d -r c83169fe80e8ad641542727745a0bd4847f34c3a doc/en/announce/release-2.3.0.txt
--- a/doc/en/announce/release-2.3.0.txt
+++ b/doc/en/announce/release-2.3.0.txt
@@ -13,12 +13,12 @@
For detailed info and tutorial-style examples, see:
- http://pytest.org/dev/fixture.html
+ http://pytest.org/latest/fixture.html
Moreover, there is now support for using pytest fixtures/funcargs with
unittest-style suites, see here for examples:
- http://pytest.org/dev/unittest.html
+ http://pytest.org/latest/unittest.html
Besides, more unittest-test suites are now expected to "simply work"
with pytest.
@@ -28,11 +28,11 @@
pytest-2.2.4.
If you are interested in the precise reasoning of the pytest-2.3 fixture
-evolution, please consult http://pytest.org/dev/funcarg_compare.html
+evolution, please consult http://pytest.org/latest/funcarg_compare.html
For general info on installation and getting started:
- http://pytest.org/dev/getting-started.html
+ http://pytest.org/latest/getting-started.html
Docs and PDF access as usual at:
@@ -51,9 +51,10 @@
holger krekel
-Changes between 2.2.4 and 2.3.0.dev
+Changes between 2.2.4 and 2.3.0
-----------------------------------
+- fix issue202 - better automatic names for parametrized test functions
- fix issue139 - introduce @pytest.fixture which allows direct scoping
and parametrization of funcarg factories. Introduce new @pytest.setup
marker to allow the writing of setup functions which accept funcargs.
@@ -130,1041 +131,3 @@
- py.test -vv will show all of assert comparisations instead of truncating
-Changes between 2.2.3 and 2.2.4
------------------------------------
-
-- fix error message for rewritten assertions involving the % operator
-- fix issue 126: correctly match all invalid xml characters for junitxml
- binary escape
-- fix issue with unittest: now @unittest.expectedFailure markers should
- be processed correctly (you can also use @pytest.mark markers)
-- document integration with the extended distribute/setuptools test commands
-- fix issue 140: propperly get the real functions
- of bound classmethods for setup/teardown_class
-- fix issue #141: switch from the deceased paste.pocoo.org to bpaste.net
-- fix issue #143: call unconfigure/sessionfinish always when
- configure/sessionstart where called
-- fix issue #144: better mangle test ids to junitxml classnames
-- upgrade distribute_setup.py to 0.6.27
-
-Changes between 2.2.2 and 2.2.3
-----------------------------------------
-
-- fix uploaded package to only include neccesary files
-
-Changes between 2.2.1 and 2.2.2
-----------------------------------------
-
-- fix issue101: wrong args to unittest.TestCase test function now
- produce better output
-- fix issue102: report more useful errors and hints for when a
- test directory was renamed and some pyc/__pycache__ remain
-- fix issue106: allow parametrize to be applied multiple times
- e.g. from module, class and at function level.
-- fix issue107: actually perform session scope finalization
-- don't check in parametrize if indirect parameters are funcarg names
-- add chdir method to monkeypatch funcarg
-- fix crash resulting from calling monkeypatch undo a second time
-- fix issue115: make --collectonly robust against early failure
- (missing files/directories)
-- "-qq --collectonly" now shows only files and the number of tests in them
-- "-q --collectonly" now shows test ids
-- allow adding of attributes to test reports such that it also works
- with distributed testing (no upgrade of pytest-xdist needed)
-
-Changes between 2.2.0 and 2.2.1
-----------------------------------------
-
-- fix issue99 (in pytest and py) internallerrors with resultlog now
- produce better output - fixed by normalizing pytest_internalerror
- input arguments.
-- fix issue97 / traceback issues (in pytest and py) improve traceback output
- in conjunction with jinja2 and cython which hack tracebacks
-- fix issue93 (in pytest and pytest-xdist) avoid "delayed teardowns":
- the final test in a test node will now run its teardown directly
- instead of waiting for the end of the session. Thanks Dave Hunt for
- the good reporting and feedback. The pytest_runtest_protocol as well
- as the pytest_runtest_teardown hooks now have "nextitem" available
- which will be None indicating the end of the test run.
-- fix collection crash due to unknown-source collected items, thanks
- to Ralf Schmitt (fixed by depending on a more recent pylib)
-
-Changes between 2.1.3 and 2.2.0
-----------------------------------------
-
-- fix issue90: introduce eager tearing down of test items so that
- teardown function are called earlier.
-- add an all-powerful metafunc.parametrize function which allows to
- parametrize test function arguments in multiple steps and therefore
- from indepdenent plugins and palces.
-- add a @pytest.mark.parametrize helper which allows to easily
- call a test function with different argument values
-- Add examples to the "parametrize" example page, including a quick port
- of Test scenarios and the new parametrize function and decorator.
-- introduce registration for "pytest.mark.*" helpers via ini-files
- or through plugin hooks. Also introduce a "--strict" option which
- will treat unregistered markers as errors
- allowing to avoid typos and maintain a well described set of markers
- for your test suite. See exaples at http://pytest.org/latest/mark.html
- and its links.
-- issue50: introduce "-m marker" option to select tests based on markers
- (this is a stricter and more predictable version of '-k' in that "-m"
- only matches complete markers and has more obvious rules for and/or
- semantics.
-- new feature to help optimizing the speed of your tests:
- --durations=N option for displaying N slowest test calls
- and setup/teardown methods.
-- fix issue87: --pastebin now works with python3
-- fix issue89: --pdb with unexpected exceptions in doctest work more sensibly
-- fix and cleanup pytest's own test suite to not leak FDs
-- fix issue83: link to generated funcarg list
-- fix issue74: pyarg module names are now checked against imp.find_module false positives
-- fix compatibility with twisted/trial-11.1.0 use cases
-- simplify Node.listchain
-- simplify junitxml output code by relying on py.xml
-- add support for skip properties on unittest classes and functions
-
-Changes between 2.1.2 and 2.1.3
-----------------------------------------
-
-- fix issue79: assertion rewriting failed on some comparisons in boolops
-- correctly handle zero length arguments (a la pytest '')
-- fix issue67 / junitxml now contains correct test durations, thanks ronny
-- fix issue75 / skipping test failure on jython
-- fix issue77 / Allow assertrepr_compare hook to apply to a subset of tests
-
-Changes between 2.1.1 and 2.1.2
-----------------------------------------
-
-- fix assertion rewriting on files with windows newlines on some Python versions
-- refine test discovery by package/module name (--pyargs), thanks Florian Mayer
-- fix issue69 / assertion rewriting fixed on some boolean operations
-- fix issue68 / packages now work with assertion rewriting
-- fix issue66: use different assertion rewriting caches when the -O option is passed
-- don't try assertion rewriting on Jython, use reinterp
-
-Changes between 2.1.0 and 2.1.1
-----------------------------------------------
-
-- fix issue64 / pytest.set_trace now works within pytest_generate_tests hooks
-- fix issue60 / fix error conditions involving the creation of __pycache__
-- fix issue63 / assertion rewriting on inserts involving strings containing '%'
-- fix assertion rewriting on calls with a ** arg
-- don't cache rewritten modules if bytecode generation is disabled
-- fix assertion rewriting in read-only directories
-- fix issue59: provide system-out/err tags for junitxml output
-- fix issue61: assertion rewriting on boolean operations with 3 or more operands
-- you can now build a man page with "cd doc ; make man"
-
-Changes between 2.0.3 and 2.1.0.DEV
-----------------------------------------------
-
-- fix issue53 call nosestyle setup functions with correct ordering
-- fix issue58 and issue59: new assertion code fixes
-- merge Benjamin's assertionrewrite branch: now assertions
- for test modules on python 2.6 and above are done by rewriting
- the AST and saving the pyc file before the test module is imported.
- see doc/assert.txt for more info.
-- fix issue43: improve doctests with better traceback reporting on
- unexpected exceptions
-- fix issue47: timing output in junitxml for test cases is now correct
-- fix issue48: typo in MarkInfo repr leading to exception
-- fix issue49: avoid confusing error when initizaliation partially fails
-- fix issue44: env/username expansion for junitxml file path
-- show releaselevel information in test runs for pypy
-- reworked doc pages for better navigation and PDF generation
-- report KeyboardInterrupt even if interrupted during session startup
-- fix issue 35 - provide PDF doc version and download link from index page
-
-Changes between 2.0.2 and 2.0.3
-----------------------------------------------
-
-- fix issue38: nicer tracebacks on calls to hooks, particularly early
- configure/sessionstart ones
-
-- fix missing skip reason/meta information in junitxml files, reported
- via http://lists.idyll.org/pipermail/testing-in-python/2011-March/003928.html
-
-- fix issue34: avoid collection failure with "test" prefixed classes
- deriving from object.
-
-- don't require zlib (and other libs) for genscript plugin without
- --genscript actually being used.
-
-- speed up skips (by not doing a full traceback represenation
- internally)
-
-- fix issue37: avoid invalid characters in junitxml's output
-
-Changes between 2.0.1 and 2.0.2
-----------------------------------------------
-
-- tackle issue32 - speed up test runs of very quick test functions
- by reducing the relative overhead
-
-- fix issue30 - extended xfail/skipif handling and improved reporting.
- If you have a syntax error in your skip/xfail
- expressions you now get nice error reports.
-
- Also you can now access module globals from xfail/skipif
- expressions so that this for example works now::
-
- import pytest
- import mymodule
- @pytest.mark.skipif("mymodule.__version__[0] == "1")
- def test_function():
- pass
-
- This will not run the test function if the module's version string
- does not start with a "1". Note that specifying a string instead
- of a boolean expressions allows py.test to report meaningful information
- when summarizing a test run as to what conditions lead to skipping
- (or xfail-ing) tests.
-
-- fix issue28 - setup_method and pytest_generate_tests work together
- The setup_method fixture method now gets called also for
- test function invocations generated from the pytest_generate_tests
- hook.
-
-- fix issue27 - collectonly and keyword-selection (-k) now work together
- Also, if you do "py.test --collectonly -q" you now get a flat list
- of test ids that you can use to paste to the py.test commandline
- in order to execute a particular test.
-
-- fix issue25 avoid reported problems with --pdb and python3.2/encodings output
-
-- fix issue23 - tmpdir argument now works on Python3.2 and WindowsXP
- Starting with Python3.2 os.symlink may be supported. By requiring
- a newer py lib version the py.path.local() implementation acknowledges
- this.
-
-- fixed typos in the docs (thanks Victor Garcia, Brianna Laugher) and particular
- thanks to Laura Creighton who also revieved parts of the documentation.
-
-- fix slighly wrong output of verbose progress reporting for classes
- (thanks Amaury)
-
-- more precise (avoiding of) deprecation warnings for node.Class|Function accesses
-
-- avoid std unittest assertion helper code in tracebacks (thanks Ronny)
-
-Changes between 2.0.0 and 2.0.1
-----------------------------------------------
-
-- refine and unify initial capturing so that it works nicely
- even if the logging module is used on an early-loaded conftest.py
- file or plugin.
-- allow to omit "()" in test ids to allow for uniform test ids
- as produced by Alfredo's nice pytest.vim plugin.
-- fix issue12 - show plugin versions with "--version" and
- "--traceconfig" and also document how to add extra information
- to reporting test header
-- fix issue17 (import-* reporting issue on python3) by
- requiring py>1.4.0 (1.4.1 is going to include it)
-- fix issue10 (numpy arrays truth checking) by refining
- assertion interpretation in py lib
-- fix issue15: make nose compatibility tests compatible
- with python3 (now that nose-1.0 supports python3)
-- remove somewhat surprising "same-conftest" detection because
- it ignores conftest.py when they appear in several subdirs.
-- improve assertions ("not in"), thanks Floris Bruynooghe
-- improve behaviour/warnings when running on top of "python -OO"
- (assertions and docstrings are turned off, leading to potential
- false positives)
-- introduce a pytest_cmdline_processargs(args) hook
- to allow dynamic computation of command line arguments.
- This fixes a regression because py.test prior to 2.0
- allowed to set command line options from conftest.py
- files which so far pytest-2.0 only allowed from ini-files now.
-- fix issue7: assert failures in doctest modules.
- unexpected failures in doctests will not generally
- show nicer, i.e. within the doctest failing context.
-- fix issue9: setup/teardown functions for an xfail-marked
- test will report as xfail if they fail but report as normally
- passing (not xpassing) if they succeed. This only is true
- for "direct" setup/teardown invocations because teardown_class/
- teardown_module cannot closely relate to a single test.
-- fix issue14: no logging errors at process exit
-- refinements to "collecting" output on non-ttys
-- refine internal plugin registration and --traceconfig output
-- introduce a mechanism to prevent/unregister plugins from the
- command line, see http://pytest.org/plugins.html#cmdunregister
-- activate resultlog plugin by default
-- fix regression wrt yielded tests which due to the
- collection-before-running semantics were not
- setup as with pytest 1.3.4. Note, however, that
- the recommended and much cleaner way to do test
- parametraization remains the "pytest_generate_tests"
- mechanism, see the docs.
-
-Changes between 1.3.4 and 2.0.0
-----------------------------------------------
-
-- pytest-2.0 is now its own package and depends on pylib-2.0
-- new ability: python -m pytest / python -m pytest.main ability
-- new python invcation: pytest.main(args, plugins) to load
- some custom plugins early.
-- try harder to run unittest test suites in a more compatible manner
- by deferring setup/teardown semantics to the unittest package.
- also work harder to run twisted/trial and Django tests which
- should now basically work by default.
-- introduce a new way to set config options via ini-style files,
- by default setup.cfg and tox.ini files are searched. The old
- ways (certain environment variables, dynamic conftest.py reading
- is removed).
-- add a new "-q" option which decreases verbosity and prints a more
- nose/unittest-style "dot" output.
-- fix issue135 - marks now work with unittest test cases as well
-- fix issue126 - introduce py.test.set_trace() to trace execution via
- PDB during the running of tests even if capturing is ongoing.
-- fix issue123 - new "python -m py.test" invocation for py.test
- (requires Python 2.5 or above)
-- fix issue124 - make reporting more resilient against tests opening
- files on filedescriptor 1 (stdout).
-- fix issue109 - sibling conftest.py files will not be loaded.
- (and Directory collectors cannot be customized anymore from a Directory's
- conftest.py - this needs to happen at least one level up).
-- introduce (customizable) assertion failure representations and enhance
- output on assertion failures for comparisons and other cases (Floris Bruynooghe)
-- nose-plugin: pass through type-signature failures in setup/teardown
- functions instead of not calling them (Ed Singleton)
-- remove py.test.collect.Directory (follows from a major refactoring
- and simplification of the collection process)
-- majorly reduce py.test core code, shift function/python testing to own plugin
-- fix issue88 (finding custom test nodes from command line arg)
-- refine 'tmpdir' creation, will now create basenames better associated
- with test names (thanks Ronny)
-- "xpass" (unexpected pass) tests don't cause exitcode!=0
-- fix issue131 / issue60 - importing doctests in __init__ files used as namespace packages
-- fix issue93 stdout/stderr is captured while importing conftest.py
-- fix bug: unittest collected functions now also can have "pytestmark"
- applied at class/module level
-- add ability to use "class" level for cached_setup helper
-- fix strangeness: mark.* objects are now immutable, create new instances
-
-Changes between 1.3.3 and 1.3.4
-----------------------------------------------
-
-- fix issue111: improve install documentation for windows
-- fix issue119: fix custom collectability of __init__.py as a module
-- fix issue116: --doctestmodules work with __init__.py files as well
-- fix issue115: unify internal exception passthrough/catching/GeneratorExit
-- fix issue118: new --tb=native for presenting cpython-standard exceptions
-
-Changes between 1.3.2 and 1.3.3
-----------------------------------------------
-
-- fix issue113: assertion representation problem with triple-quoted strings
- (and possibly other cases)
-- make conftest loading detect that a conftest file with the same
- content was already loaded, avoids surprises in nested directory structures
- which can be produced e.g. by Hudson. It probably removes the need to use
- --confcutdir in most cases.
-- fix terminal coloring for win32
- (thanks Michael Foord for reporting)
-- fix weirdness: make terminal width detection work on stdout instead of stdin
- (thanks Armin Ronacher for reporting)
-- remove trailing whitespace in all py/text distribution files
-
-Changes between 1.3.1 and 1.3.2
-----------------------------------------------
-
-New features
-++++++++++++++++++
-
-- fix issue103: introduce py.test.raises as context manager, examples::
-
- with py.test.raises(ZeroDivisionError):
- x = 0
- 1 / x
-
- with py.test.raises(RuntimeError) as excinfo:
- call_something()
-
- # you may do extra checks on excinfo.value|type|traceback here
-
- (thanks Ronny Pfannschmidt)
-
-- Funcarg factories can now dynamically apply a marker to a
- test invocation. This is for example useful if a factory
- provides parameters to a test which are expected-to-fail::
-
- def pytest_funcarg__arg(request):
- request.applymarker(py.test.mark.xfail(reason="flaky config"))
- ...
-
- def test_function(arg):
- ...
-
-- improved error reporting on collection and import errors. This makes
- use of a more general mechanism, namely that for custom test item/collect
- nodes ``node.repr_failure(excinfo)`` is now uniformly called so that you can
- override it to return a string error representation of your choice
- which is going to be reported as a (red) string.
-
-- introduce '--junitprefix=STR' option to prepend a prefix
- to all reports in the junitxml file.
-
-Bug fixes / Maintenance
-++++++++++++++++++++++++++
-
-- make tests and the ``pytest_recwarn`` plugin in particular fully compatible
- to Python2.7 (if you use the ``recwarn`` funcarg warnings will be enabled so that
- you can properly check for their existence in a cross-python manner).
-- refine --pdb: ignore xfailed tests, unify its TB-reporting and
- don't display failures again at the end.
-- fix assertion interpretation with the ** operator (thanks Benjamin Peterson)
-- fix issue105 assignment on the same line as a failing assertion (thanks Benjamin Peterson)
-- fix issue104 proper escaping for test names in junitxml plugin (thanks anonymous)
-- fix issue57 -f|--looponfail to work with xpassing tests (thanks Ronny)
-- fix issue92 collectonly reporter and --pastebin (thanks Benjamin Peterson)
-- fix py.code.compile(source) to generate unique filenames
-- fix assertion re-interp problems on PyPy, by defering code
- compilation to the (overridable) Frame.eval class. (thanks Amaury Forgeot)
-- fix py.path.local.pyimport() to work with directories
-- streamline py.path.local.mkdtemp implementation and usage
-- don't print empty lines when showing junitxml-filename
-- add optional boolean ignore_errors parameter to py.path.local.remove
-- fix terminal writing on win32/python2.4
-- py.process.cmdexec() now tries harder to return properly encoded unicode objects
- on all python versions
-- install plain py.test/py.which scripts also for Jython, this helps to
- get canonical script paths in virtualenv situations
-- make path.bestrelpath(path) return ".", note that when calling
- X.bestrelpath the assumption is that X is a directory.
-- make initial conftest discovery ignore "--" prefixed arguments
-- fix resultlog plugin when used in an multicpu/multihost xdist situation
- (thanks Jakub Gustak)
-- perform distributed testing related reporting in the xdist-plugin
- rather than having dist-related code in the generic py.test
- distribution
-- fix homedir detection on Windows
-- ship distribute_setup.py version 0.6.13
-
-Changes between 1.3.0 and 1.3.1
----------------------------------------------
-
-New features
-++++++++++++++++++
-
-- issue91: introduce new py.test.xfail(reason) helper
- to imperatively mark a test as expected to fail. Can
- be used from within setup and test functions. This is
- useful especially for parametrized tests when certain
- configurations are expected-to-fail. In this case the
- declarative approach with the @py.test.mark.xfail cannot
- be used as it would mark all configurations as xfail.
-
-- issue102: introduce new --maxfail=NUM option to stop
- test runs after NUM failures. This is a generalization
- of the '-x' or '--exitfirst' option which is now equivalent
- to '--maxfail=1'. Both '-x' and '--maxfail' will
- now also print a line near the end indicating the Interruption.
-
-- issue89: allow py.test.mark decorators to be used on classes
- (class decorators were introduced with python2.6) and
- also allow to have multiple markers applied at class/module level
- by specifying a list.
-
-- improve and refine letter reporting in the progress bar:
- . pass
- f failed test
- s skipped tests (reminder: use for dependency/platform mismatch only)
- x xfailed test (test that was expected to fail)
- X xpassed test (test that was expected to fail but passed)
-
- You can use any combination of 'fsxX' with the '-r' extended
- reporting option. The xfail/xpass results will show up as
- skipped tests in the junitxml output - which also fixes
- issue99.
-
-- make py.test.cmdline.main() return the exitstatus instead of raising
- SystemExit and also allow it to be called multiple times. This of
- course requires that your application and tests are properly teared
- down and don't have global state.
-
-Fixes / Maintenance
-++++++++++++++++++++++
-
-- improved traceback presentation:
- - improved and unified reporting for "--tb=short" option
- - Errors during test module imports are much shorter, (using --tb=short style)
- - raises shows shorter more relevant tracebacks
- - --fulltrace now more systematically makes traces longer / inhibits cutting
-
-- improve support for raises and other dynamically compiled code by
- manipulating python's linecache.cache instead of the previous
- rather hacky way of creating custom code objects. This makes
- it seemlessly work on Jython and PyPy where it previously didn't.
-
-- fix issue96: make capturing more resilient against Control-C
- interruptions (involved somewhat substantial refactoring
- to the underlying capturing functionality to avoid race
- conditions).
-
-- fix chaining of conditional skipif/xfail decorators - so it works now
- as expected to use multiple @py.test.mark.skipif(condition) decorators,
- including specific reporting which of the conditions lead to skipping.
-
-- fix issue95: late-import zlib so that it's not required
- for general py.test startup.
-
-- fix issue94: make reporting more robust against bogus source code
- (and internally be more careful when presenting unexpected byte sequences)
-
-
-Changes between 1.2.1 and 1.3.0
----------------------------------------------
-
-- deprecate --report option in favour of a new shorter and easier to
- remember -r option: it takes a string argument consisting of any
- combination of 'xfsX' characters. They relate to the single chars
- you see during the dotted progress printing and will print an extra line
- per test at the end of the test run. This extra line indicates the exact
- position or test ID that you directly paste to the py.test cmdline in order
- to re-run a particular test.
-
-- allow external plugins to register new hooks via the new
- pytest_addhooks(pluginmanager) hook. The new release of
- the pytest-xdist plugin for distributed and looponfailing
- testing requires this feature.
-
-- add a new pytest_ignore_collect(path, config) hook to allow projects and
- plugins to define exclusion behaviour for their directory structure -
- for example you may define in a conftest.py this method::
-
- def pytest_ignore_collect(path):
- return path.check(link=1)
-
- to prevent even a collection try of any tests in symlinked dirs.
-
-- new pytest_pycollect_makemodule(path, parent) hook for
- allowing customization of the Module collection object for a
- matching test module.
-
-- extend and refine xfail mechanism:
- ``@py.test.mark.xfail(run=False)`` do not run the decorated test
- ``@py.test.mark.xfail(reason="...")`` prints the reason string in xfail summaries
- specifiying ``--runxfail`` on command line virtually ignores xfail markers
-
-- expose (previously internal) commonly useful methods:
- py.io.get_terminal_with() -> return terminal width
- py.io.ansi_print(...) -> print colored/bold text on linux/win32
- py.io.saferepr(obj) -> return limited representation string
-
-- expose test outcome related exceptions as py.test.skip.Exception,
- py.test.raises.Exception etc., useful mostly for plugins
- doing special outcome interpretation/tweaking
-
-- (issue85) fix junitxml plugin to handle tests with non-ascii output
-
-- fix/refine python3 compatibility (thanks Benjamin Peterson)
-
-- fixes for making the jython/win32 combination work, note however:
- jython2.5.1/win32 does not provide a command line launcher, see
- http://bugs.jython.org/issue1491 . See pylib install documentation
- for how to work around.
-
-- fixes for handling of unicode exception values and unprintable objects
-
-- (issue87) fix unboundlocal error in assertionold code
-
-- (issue86) improve documentation for looponfailing
-
-- refine IO capturing: stdin-redirect pseudo-file now has a NOP close() method
-
-- ship distribute_setup.py version 0.6.10
-
-- added links to the new capturelog and coverage plugins
-
-
-Changes between 1.2.1 and 1.2.0
----------------------------------------------
-
-- refined usage and options for "py.cleanup"::
-
- py.cleanup # remove "*.pyc" and "*$py.class" (jython) files
- py.cleanup -e .swp -e .cache # also remove files with these extensions
- py.cleanup -s # remove "build" and "dist" directory next to setup.py files
- py.cleanup -d # also remove empty directories
- py.cleanup -a # synonym for "-s -d -e 'pip-log.txt'"
- py.cleanup -n # dry run, only show what would be removed
-
-- add a new option "py.test --funcargs" which shows available funcargs
- and their help strings (docstrings on their respective factory function)
- for a given test path
-
-- display a short and concise traceback if a funcarg lookup fails
-
-- early-load "conftest.py" files in non-dot first-level sub directories.
- allows to conveniently keep and access test-related options in a ``test``
- subdir and still add command line options.
-
-- fix issue67: new super-short traceback-printing option: "--tb=line" will print a single line for each failing (python) test indicating its filename, lineno and the failure value
-
-- fix issue78: always call python-level teardown functions even if the
- according setup failed. This includes refinements for calling setup_module/class functions
- which will now only be called once instead of the previous behaviour where they'd be called
- multiple times if they raise an exception (including a Skipped exception). Any exception
- will be re-corded and associated with all tests in the according module/class scope.
-
-- fix issue63: assume <40 columns to be a bogus terminal width, default to 80
-
-- fix pdb debugging to be in the correct frame on raises-related errors
-
-- update apipkg.py to fix an issue where recursive imports might
- unnecessarily break importing
-
-- fix plugin links
-
-Changes between 1.2 and 1.1.1
----------------------------------------------
-
-- moved dist/looponfailing from py.test core into a new
- separately released pytest-xdist plugin.
-
-- new junitxml plugin: --junitxml=path will generate a junit style xml file
- which is processable e.g. by the Hudson CI system.
-
-- new option: --genscript=path will generate a standalone py.test script
- which will not need any libraries installed. thanks to Ralf Schmitt.
-
-- new option: --ignore will prevent specified path from collection.
- Can be specified multiple times.
-
-- new option: --confcutdir=dir will make py.test only consider conftest
- files that are relative to the specified dir.
-
-- new funcarg: "pytestconfig" is the pytest config object for access
- to command line args and can now be easily used in a test.
-
-- install 'py.test' and `py.which` with a ``-$VERSION`` suffix to
- disambiguate between Python3, python2.X, Jython and PyPy installed versions.
-
-- new "pytestconfig" funcarg allows access to test config object
-
-- new "pytest_report_header" hook can return additional lines
- to be displayed at the header of a test run.
-
-- (experimental) allow "py.test path::name1::name2::..." for pointing
- to a test within a test collection directly. This might eventually
- evolve as a full substitute to "-k" specifications.
-
-- streamlined plugin loading: order is now as documented in
- customize.html: setuptools, ENV, commandline, conftest.
- also setuptools entry point names are turned to canonical namees ("pytest_*")
-
-- automatically skip tests that need 'capfd' but have no os.dup
-
-- allow pytest_generate_tests to be defined in classes as well
-
-- deprecate usage of 'disabled' attribute in favour of pytestmark
-- deprecate definition of Directory, Module, Class and Function nodes
- in conftest.py files. Use pytest collect hooks instead.
-
-- collection/item node specific runtest/collect hooks are only called exactly
- on matching conftest.py files, i.e. ones which are exactly below
- the filesystem path of an item
-
-- change: the first pytest_collect_directory hook to return something
- will now prevent further hooks to be called.
-
-- change: figleaf plugin now requires --figleaf to run. Also
- change its long command line options to be a bit shorter (see py.test -h).
-
-- change: pytest doctest plugin is now enabled by default and has a
- new option --doctest-glob to set a pattern for file matches.
-
-- change: remove internal py._* helper vars, only keep py._pydir
-
-- robustify capturing to survive if custom pytest_runtest_setup
- code failed and prevented the capturing setup code from running.
-
-- make py.test.* helpers provided by default plugins visible early -
- works transparently both for pydoc and for interactive sessions
- which will regularly see e.g. py.test.mark and py.test.importorskip.
-
-- simplify internal plugin manager machinery
-- simplify internal collection tree by introducing a RootCollector node
-
-- fix assert reinterpreation that sees a call containing "keyword=..."
-
-- fix issue66: invoke pytest_sessionstart and pytest_sessionfinish
- hooks on slaves during dist-testing, report module/session teardown
- hooks correctly.
-
-- fix issue65: properly handle dist-testing if no
- execnet/py lib installed remotely.
-
-- skip some install-tests if no execnet is available
-
-- fix docs, fix internal bin/ script generation
-
-
-Changes between 1.1.1 and 1.1.0
----------------------------------------------
-
-- introduce automatic plugin registration via 'pytest11'
- entrypoints via setuptools' pkg_resources.iter_entry_points
-
-- fix py.test dist-testing to work with execnet >= 1.0.0b4
-
-- re-introduce py.test.cmdline.main() for better backward compatibility
-
-- svn paths: fix a bug with path.check(versioned=True) for svn paths,
- allow '%' in svn paths, make svnwc.update() default to interactive mode
- like in 1.0.x and add svnwc.update(interactive=False) to inhibit interaction.
-
-- refine distributed tarball to contain test and no pyc files
-
-- try harder to have deprecation warnings for py.compat.* accesses
- report a correct location
-
-Changes between 1.1.0 and 1.0.2
----------------------------------------------
-
-* adjust and improve docs
-
-* remove py.rest tool and internal namespace - it was
- never really advertised and can still be used with
- the old release if needed. If there is interest
- it could be revived into its own tool i guess.
-
-* fix issue48 and issue59: raise an Error if the module
- from an imported test file does not seem to come from
- the filepath - avoids "same-name" confusion that has
- been reported repeatedly
-
-* merged Ronny's nose-compatibility hacks: now
- nose-style setup_module() and setup() functions are
- supported
-
-* introduce generalized py.test.mark function marking
-
-* reshuffle / refine command line grouping
-
-* deprecate parser.addgroup in favour of getgroup which creates option group
-
-* add --report command line option that allows to control showing of skipped/xfailed sections
-
-* generalized skipping: a new way to mark python functions with skipif or xfail
- at function, class and modules level based on platform or sys-module attributes.
-
-* extend py.test.mark decorator to allow for positional args
-
-* introduce and test "py.cleanup -d" to remove empty directories
-
-* fix issue #59 - robustify unittest test collection
-
-* make bpython/help interaction work by adding an __all__ attribute
- to ApiModule, cleanup initpkg
-
-* use MIT license for pylib, add some contributors
-
-* remove py.execnet code and substitute all usages with 'execnet' proper
-
-* fix issue50 - cached_setup now caches more to expectations
- for test functions with multiple arguments.
-
-* merge Jarko's fixes, issue #45 and #46
-
-* add the ability to specify a path for py.lookup to search in
-
-* fix a funcarg cached_setup bug probably only occuring
- in distributed testing and "module" scope with teardown.
-
-* many fixes and changes for making the code base python3 compatible,
- many thanks to Benjamin Peterson for helping with this.
-
-* consolidate builtins implementation to be compatible with >=2.3,
- add helpers to ease keeping 2 and 3k compatible code
-
-* deprecate py.compat.doctest|subprocess|textwrap|optparse
-
-* deprecate py.magic.autopath, remove py/magic directory
-
-* move pytest assertion handling to py/code and a pytest_assertion
- plugin, add "--no-assert" option, deprecate py.magic namespaces
- in favour of (less) py.code ones.
-
-* consolidate and cleanup py/code classes and files
-
-* cleanup py/misc, move tests to bin-for-dist
-
-* introduce delattr/delitem/delenv methods to py.test's monkeypatch funcarg
-
-* consolidate py.log implementation, remove old approach.
-
-* introduce py.io.TextIO and py.io.BytesIO for distinguishing between
- text/unicode and byte-streams (uses underlying standard lib io.*
- if available)
-
-* make py.unittest_convert helper script available which converts "unittest.py"
- style files into the simpler assert/direct-test-classes py.test/nosetests
- style. The script was written by Laura Creighton.
-
-* simplified internal localpath implementation
-
-Changes between 1.0.1 and 1.0.2
--------------------------------------------
-
-* fixing packaging issues, triggered by fedora redhat packaging,
- also added doc, examples and contrib dirs to the tarball.
-
-* added a documentation link to the new django plugin.
-
-Changes between 1.0.0 and 1.0.1
--------------------------------------------
-
-* added a 'pytest_nose' plugin which handles nose.SkipTest,
- nose-style function/method/generator setup/teardown and
- tries to report functions correctly.
-
-* capturing of unicode writes or encoded strings to sys.stdout/err
- work better, also terminalwriting was adapted and somewhat
- unified between windows and linux.
-
-* improved documentation layout and content a lot
-
-* added a "--help-config" option to show conftest.py / ENV-var names for
- all longopt cmdline options, and some special conftest.py variables.
- renamed 'conf_capture' conftest setting to 'option_capture' accordingly.
-
-* fix issue #27: better reporting on non-collectable items given on commandline
- (e.g. pyc files)
-
-* fix issue #33: added --version flag (thanks Benjamin Peterson)
-
-* fix issue #32: adding support for "incomplete" paths to wcpath.status()
-
-* "Test" prefixed classes are *not* collected by default anymore if they
- have an __init__ method
-
-* monkeypatch setenv() now accepts a "prepend" parameter
-
-* improved reporting of collection error tracebacks
-
-* simplified multicall mechanism and plugin architecture,
- renamed some internal methods and argnames
-
-Changes between 1.0.0b9 and 1.0.0
--------------------------------------------
-
-* more terse reporting try to show filesystem path relatively to current dir
-* improve xfail output a bit
-
-Changes between 1.0.0b8 and 1.0.0b9
--------------------------------------------
-
-* cleanly handle and report final teardown of test setup
-
-* fix svn-1.6 compat issue with py.path.svnwc().versioned()
- (thanks Wouter Vanden Hove)
-
-* setup/teardown or collection problems now show as ERRORs
- or with big "E"'s in the progress lines. they are reported
- and counted separately.
-
-* dist-testing: properly handle test items that get locally
- collected but cannot be collected on the remote side - often
- due to platform/dependency reasons
-
-* simplified py.test.mark API - see keyword plugin documentation
-
-* integrate better with logging: capturing now by default captures
- test functions and their immediate setup/teardown in a single stream
-
-* capsys and capfd funcargs now have a readouterr() and a close() method
- (underlyingly py.io.StdCapture/FD objects are used which grew a
- readouterr() method as well to return snapshots of captured out/err)
-
-* make assert-reinterpretation work better with comparisons not
- returning bools (reported with numpy from thanks maciej fijalkowski)
-
-* reworked per-test output capturing into the pytest_iocapture.py plugin
- and thus removed capturing code from config object
-
-* item.repr_failure(excinfo) instead of item.repr_failure(excinfo, outerr)
-
-
-Changes between 1.0.0b7 and 1.0.0b8
--------------------------------------------
-
-* pytest_unittest-plugin is now enabled by default
-
-* introduced pytest_keyboardinterrupt hook and
- refined pytest_sessionfinish hooked, added tests.
-
-* workaround a buggy logging module interaction ("closing already closed
- files"). Thanks to Sridhar Ratnakumar for triggering.
-
-* if plugins use "py.test.importorskip" for importing
- a dependency only a warning will be issued instead
- of exiting the testing process.
-
-* many improvements to docs:
- - refined funcargs doc , use the term "factory" instead of "provider"
- - added a new talk/tutorial doc page
- - better download page
- - better plugin docstrings
- - added new plugins page and automatic doc generation script
-
-* fixed teardown problem related to partially failing funcarg setups
- (thanks MrTopf for reporting), "pytest_runtest_teardown" is now
- always invoked even if the "pytest_runtest_setup" failed.
-
-* tweaked doctest output for docstrings in py modules,
- thanks Radomir.
-
-Changes between 1.0.0b3 and 1.0.0b7
--------------------------------------------
-
-* renamed py.test.xfail back to py.test.mark.xfail to avoid
- two ways to decorate for xfail
-
-* re-added py.test.mark decorator for setting keywords on functions
- (it was actually documented so removing it was not nice)
-
-* remove scope-argument from request.addfinalizer() because
- request.cached_setup has the scope arg. TOOWTDI.
-
-* perform setup finalization before reporting failures
-
-* apply modified patches from Andreas Kloeckner to allow
- test functions to have no func_code (#22) and to make
- "-k" and function keywords work (#20)
-
-* apply patch from Daniel Peolzleithner (issue #23)
-
-* resolve issue #18, multiprocessing.Manager() and
- redirection clash
-
-* make __name__ == "__channelexec__" for remote_exec code
-
-Changes between 1.0.0b1 and 1.0.0b3
--------------------------------------------
-
-* plugin classes are removed: one now defines
- hooks directly in conftest.py or global pytest_*.py
- files.
-
-* added new pytest_namespace(config) hook that allows
- to inject helpers directly to the py.test.* namespace.
-
-* documented and refined many hooks
-
-* added new style of generative tests via
- pytest_generate_tests hook that integrates
- well with function arguments.
-
-
-Changes between 0.9.2 and 1.0.0b1
--------------------------------------------
-
-* introduced new "funcarg" setup method,
- see doc/test/funcarg.txt
-
-* introduced plugin architecuture and many
- new py.test plugins, see
- doc/test/plugins.txt
-
-* teardown_method is now guaranteed to get
- called after a test method has run.
-
-* new method: py.test.importorskip(mod,minversion)
- will either import or call py.test.skip()
-
-* completely revised internal py.test architecture
-
-* new py.process.ForkedFunc object allowing to
- fork execution of a function to a sub process
- and getting a result back.
-
-XXX lots of things missing here XXX
-
-Changes between 0.9.1 and 0.9.2
--------------------------------------------
-
-* refined installation and metadata, created new setup.py,
- now based on setuptools/ez_setup (thanks to Ralf Schmitt
- for his support).
-
-* improved the way of making py.* scripts available in
- windows environments, they are now added to the
- Scripts directory as ".cmd" files.
-
-* py.path.svnwc.status() now is more complete and
- uses xml output from the 'svn' command if available
- (Guido Wesdorp)
-
-* fix for py.path.svn* to work with svn 1.5
- (Chris Lamb)
-
-* fix path.relto(otherpath) method on windows to
- use normcase for checking if a path is relative.
-
-* py.test's traceback is better parseable from editors
- (follows the filenames:LINENO: MSG convention)
- (thanks to Osmo Salomaa)
-
-* fix to javascript-generation, "py.test --runbrowser"
- should work more reliably now
-
-* removed previously accidentally added
- py.test.broken and py.test.notimplemented helpers.
-
-* there now is a py.__version__ attribute
-
-Changes between 0.9.0 and 0.9.1
--------------------------------------------
-
-This is a fairly complete list of changes between 0.9 and 0.9.1, which can
-serve as a reference for developers.
-
-* allowing + signs in py.path.svn urls [39106]
-* fixed support for Failed exceptions without excinfo in py.test [39340]
-* added support for killing processes for Windows (as well as platforms that
- support os.kill) in py.misc.killproc [39655]
-* added setup/teardown for generative tests to py.test [40702]
-* added detection of FAILED TO LOAD MODULE to py.test [40703, 40738, 40739]
-* fixed problem with calling .remove() on wcpaths of non-versioned files in
- py.path [44248]
-* fixed some import and inheritance issues in py.test [41480, 44648, 44655]
-* fail to run greenlet tests when pypy is available, but without stackless
- [45294]
-* small fixes in rsession tests [45295]
-* fixed issue with 2.5 type representations in py.test [45483, 45484]
-* made that internal reporting issues displaying is done atomically in py.test
- [45518]
-* made that non-existing files are igored by the py.lookup script [45519]
-* improved exception name creation in py.test [45535]
-* made that less threads are used in execnet [merge in 45539]
-* removed lock required for atomical reporting issue displaying in py.test
- [45545]
-* removed globals from execnet [45541, 45547]
-* refactored cleanup mechanics, made that setDaemon is set to 1 to make atexit
- get called in 2.5 (py.execnet) [45548]
-* fixed bug in joining threads in py.execnet's servemain [45549]
-* refactored py.test.rsession tests to not rely on exact output format anymore
- [45646]
-* using repr() on test outcome [45647]
-* added 'Reason' classes for py.test.skip() [45648, 45649]
-* killed some unnecessary sanity check in py.test.collect [45655]
-* avoid using os.tmpfile() in py.io.fdcapture because on Windows it's only
- usable by Administrators [45901]
-* added support for locking and non-recursive commits to py.path.svnwc [45994]
-* locking files in py.execnet to prevent CPython from segfaulting [46010]
-* added export() method to py.path.svnurl
-* fixed -d -x in py.test [47277]
-* fixed argument concatenation problem in py.path.svnwc [49423]
-* restore py.test behaviour that it exits with code 1 when there are failures
- [49974]
-* don't fail on html files that don't have an accompanying .txt file [50606]
-* fixed 'utestconvert.py < input' [50645]
-* small fix for code indentation in py.code.source [50755]
-* fix _docgen.py documentation building [51285]
-* improved checks for source representation of code blocks in py.test [51292]
-* added support for passing authentication to py.path.svn* objects [52000,
- 52001]
-* removed sorted() call for py.apigen tests in favour of [].sort() to support
- Python 2.3 [52481]
diff -r 72ae4efeefa55befefa2e0bbbc45586e807c4c6d -r c83169fe80e8ad641542727745a0bd4847f34c3a doc/en/assert.txt
--- a/doc/en/assert.txt
+++ b/doc/en/assert.txt
@@ -26,7 +26,7 @@
$ py.test test_assert1.py
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 1 items
test_assert1.py F
@@ -110,7 +110,7 @@
$ py.test test_assert2.py
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 1 items
test_assert2.py F
diff -r 72ae4efeefa55befefa2e0bbbc45586e807c4c6d -r c83169fe80e8ad641542727745a0bd4847f34c3a doc/en/capture.txt
--- a/doc/en/capture.txt
+++ b/doc/en/capture.txt
@@ -64,7 +64,7 @@
$ py.test
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 2 items
test_module.py .F
@@ -78,7 +78,7 @@
test_module.py:9: AssertionError
----------------------------- Captured stdout ------------------------------
- setting up <function test_func2 at 0x2b04578>
+ setting up <function test_func2 at 0x1443140>
==================== 1 failed, 1 passed in 0.01 seconds ====================
Accessing captured output from a test function
diff -r 72ae4efeefa55befefa2e0bbbc45586e807c4c6d -r c83169fe80e8ad641542727745a0bd4847f34c3a doc/en/doctest.txt
--- a/doc/en/doctest.txt
+++ b/doc/en/doctest.txt
@@ -44,9 +44,9 @@
$ py.test
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 1 items
mymodule.py .
- ========================= 1 passed in 0.02 seconds =========================
+ ========================= 1 passed in 0.04 seconds =========================
diff -r 72ae4efeefa55befefa2e0bbbc45586e807c4c6d -r c83169fe80e8ad641542727745a0bd4847f34c3a doc/en/example/attic_remoteinterpreter.txt
--- a/doc/en/example/attic_remoteinterpreter.txt
+++ b/doc/en/example/attic_remoteinterpreter.txt
@@ -63,7 +63,7 @@
$ py.test test_remoteinterpreter.py
Traceback (most recent call last):
File "/home/hpk/p/pytest/.tox/regen/bin/py.test", line 9, in <module>
- load_entry_point('pytest==2.3.0.dev28', 'console_scripts', 'py.test')()
+ load_entry_point('pytest==2.3.0', 'console_scripts', 'py.test')()
File "/home/hpk/p/pytest/.tox/regen/local/lib/python2.7/site-packages/_pytest/core.py", line 473, in main
config = _prepareconfig(args, plugins)
File "/home/hpk/p/pytest/.tox/regen/local/lib/python2.7/site-packages/_pytest/core.py", line 463, in _prepareconfig
@@ -98,7 +98,7 @@
self._conftestpath2mod[conftestpath] = mod = conftestpath.pyimport()
File "/home/hpk/p/pytest/.tox/regen/local/lib/python2.7/site-packages/py/_path/local.py", line 532, in pyimport
__import__(modname)
- File "/tmp/doc-exec-111/conftest.py", line 2, in <module>
+ File "/tmp/doc-exec-172/conftest.py", line 2, in <module>
from .remoteinterpreter import RemoteInterpreter
ValueError: Attempted relative import in non-package
@@ -150,7 +150,7 @@
$ py.test -q test_ssh.py -rs
Traceback (most recent call last):
File "/home/hpk/p/pytest/.tox/regen/bin/py.test", line 9, in <module>
- load_entry_point('pytest==2.3.0.dev28', 'console_scripts', 'py.test')()
+ load_entry_point('pytest==2.3.0', 'console_scripts', 'py.test')()
File "/home/hpk/p/pytest/.tox/regen/local/lib/python2.7/site-packages/_pytest/core.py", line 473, in main
config = _prepareconfig(args, plugins)
File "/home/hpk/p/pytest/.tox/regen/local/lib/python2.7/site-packages/_pytest/core.py", line 463, in _prepareconfig
@@ -185,7 +185,7 @@
self._conftestpath2mod[conftestpath] = mod = conftestpath.pyimport()
File "/home/hpk/p/pytest/.tox/regen/local/lib/python2.7/site-packages/py/_path/local.py", line 532, in pyimport
__import__(modname)
- File "/tmp/doc-exec-111/conftest.py", line 2, in <module>
+ File "/tmp/doc-exec-172/conftest.py", line 2, in <module>
from myapp import MyApp
ImportError: No module named myapp
diff -r 72ae4efeefa55befefa2e0bbbc45586e807c4c6d -r c83169fe80e8ad641542727745a0bd4847f34c3a doc/en/example/markers.txt
--- a/doc/en/example/markers.txt
+++ b/doc/en/example/markers.txt
@@ -26,7 +26,7 @@
$ py.test -v -m webtest
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28 -- /home/hpk/p/pytest/.tox/regen/bin/python
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0 -- /home/hpk/p/pytest/.tox/regen/bin/python
collecting ... collected 2 items
test_server.py:3: test_send_http PASSED
@@ -38,7 +38,7 @@
$ py.test -v -m "not webtest"
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28 -- /home/hpk/p/pytest/.tox/regen/bin/python
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0 -- /home/hpk/p/pytest/.tox/regen/bin/python
collecting ... collected 2 items
test_server.py:6: test_something_quick PASSED
@@ -71,6 +71,8 @@
@pytest.mark.parametrize(argnames, argvalues): call a test function multiple times passing in multiple different argument value sets. Example: @parametrize('arg1', [1,2]) would lead to two calls of the decorated test function, one with arg1=1 and another with arg1=2.
+ @pytest.mark.usefixtures(fixturename1, fixturename2, ...): mark tests as needing all of the specified fixtures.
+
@pytest.mark.tryfirst: mark a hook implementation function such that the plugin machinery will try to call it first/as early as possible.
@pytest.mark.trylast: mark a hook implementation function such that the plugin machinery will try to call it last/as late as possible.
@@ -143,7 +145,7 @@
$ py.test -k send_http # running with the above defined examples
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 4 items
test_server.py .
@@ -155,7 +157,7 @@
$ py.test -k-send_http
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 4 items
test_mark_classlevel.py ..
@@ -168,7 +170,7 @@
$ py.test -kTestClass
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 4 items
test_mark_classlevel.py ..
@@ -221,23 +223,23 @@
$ py.test -E stage2
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 1 items
test_someenv.py s
- ======================== 1 skipped in 0.01 seconds =========================
+ ======================== 1 skipped in 0.00 seconds =========================
and here is one that specifies exactly the environment needed::
$ py.test -E stage1
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 1 items
test_someenv.py .
- ========================= 1 passed in 0.01 seconds =========================
+ ========================= 1 passed in 0.00 seconds =========================
The ``--markers`` option always gives you a list of available markers::
@@ -250,6 +252,8 @@
@pytest.mark.parametrize(argnames, argvalues): call a test function multiple times passing in multiple different argument value sets. Example: @parametrize('arg1', [1,2]) would lead to two calls of the decorated test function, one with arg1=1 and another with arg1=2.
+ @pytest.mark.usefixtures(fixturename1, fixturename2, ...): mark tests as needing all of the specified fixtures.
+
@pytest.mark.tryfirst: mark a hook implementation function such that the plugin machinery will try to call it first/as early as possible.
@pytest.mark.trylast: mark a hook implementation function such that the plugin machinery will try to call it last/as late as possible.
@@ -347,12 +351,12 @@
$ py.test -rs # this option reports skip reasons
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 4 items
test_plat.py s.s.
========================= short test summary info ==========================
- SKIP [2] /tmp/doc-exec-113/conftest.py:12: cannot run on platform linux2
+ SKIP [2] /tmp/doc-exec-174/conftest.py:12: cannot run on platform linux2
=================== 2 passed, 2 skipped in 0.01 seconds ====================
@@ -360,7 +364,7 @@
$ py.test -m linux2
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 4 items
test_plat.py .
diff -r 72ae4efeefa55befefa2e0bbbc45586e807c4c6d -r c83169fe80e8ad641542727745a0bd4847f34c3a doc/en/example/nonpython.txt
--- a/doc/en/example/nonpython.txt
+++ b/doc/en/example/nonpython.txt
@@ -27,7 +27,7 @@
nonpython $ py.test test_simple.yml
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 2 items
test_simple.yml .F
@@ -56,7 +56,7 @@
nonpython $ py.test -v
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28 -- /home/hpk/p/pytest/.tox/regen/bin/python
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0 -- /home/hpk/p/pytest/.tox/regen/bin/python
collecting ... collected 2 items
test_simple.yml:1: usecase: ok PASSED
@@ -74,7 +74,7 @@
nonpython $ py.test --collectonly
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 2 items
<YamlFile 'test_simple.yml'><YamlItem 'ok'>
diff -r 72ae4efeefa55befefa2e0bbbc45586e807c4c6d -r c83169fe80e8ad641542727745a0bd4847f34c3a doc/en/example/parametrize.txt
--- a/doc/en/example/parametrize.txt
+++ b/doc/en/example/parametrize.txt
@@ -104,7 +104,7 @@
$ py.test test_scenarios.py
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 4 items
test_scenarios.py ....
@@ -116,7 +116,7 @@
$ py.test --collectonly test_scenarios.py
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 4 items
<Module 'test_scenarios.py'><Class 'TestSampleWithScenarios'>
@@ -180,7 +180,7 @@
$ py.test test_backends.py --collectonly
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 2 items
<Module 'test_backends.py'><Function 'test_db_initialized[d1]'>
@@ -195,7 +195,7 @@
================================= FAILURES =================================
_________________________ test_db_initialized[d2] __________________________
- db = <conftest.DB2 instance at 0x126b878>
+ db = <conftest.DB2 instance at 0x1c31878>
def test_db_initialized(db):
# a dummy test
@@ -250,7 +250,7 @@
================================= FAILURES =================================
________________________ TestClass.test_equals[1-2] ________________________
- self = <test_parametrize.TestClass instance at 0x2c24b90>, a = 1, b = 2
+ self = <test_parametrize.TestClass instance at 0x203c4d0>, a = 1, b = 2
def test_equals(self, a, b):
> assert a == b
diff -r 72ae4efeefa55befefa2e0bbbc45586e807c4c6d -r c83169fe80e8ad641542727745a0bd4847f34c3a doc/en/example/pythoncollection.txt
--- a/doc/en/example/pythoncollection.txt
+++ b/doc/en/example/pythoncollection.txt
@@ -43,7 +43,7 @@
$ py.test --collectonly
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 2 items
<Module 'check_myapp.py'><Class 'CheckMyApp'>
@@ -51,7 +51,7 @@
<Function 'check_simple'><Function 'check_complex'>
- ============================= in 0.00 seconds =============================
+ ============================= in 0.01 seconds =============================
Interpreting cmdline arguments as Python packages
-----------------------------------------------------
@@ -82,7 +82,7 @@
. $ py.test --collectonly pythoncollection.py
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 3 items
<Module 'pythoncollection.py'><Function 'test_function'>
@@ -135,7 +135,7 @@
$ py.test --collectonly
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 1 items
<Module 'pkg/module_py2.py'><Function 'test_only_on_python2'>
diff -r 72ae4efeefa55befefa2e0bbbc45586e807c4c6d -r c83169fe80e8ad641542727745a0bd4847f34c3a doc/en/example/reportingdemo.txt
--- a/doc/en/example/reportingdemo.txt
+++ b/doc/en/example/reportingdemo.txt
@@ -13,7 +13,7 @@
assertion $ py.test failure_demo.py
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 39 items
failure_demo.py FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
@@ -30,7 +30,7 @@
failure_demo.py:15: AssertionError
_________________________ TestFailing.test_simple __________________________
- self = <failure_demo.TestFailing object at 0x1619d90>
+ self = <failure_demo.TestFailing object at 0x16ce7d0>
def test_simple(self):
def f():
@@ -40,13 +40,13 @@
> assert f() == g()
E assert 42 == 43
- E + where 42 = <function f at 0x15ba320>()
- E + and 43 = <function g at 0x15ba398>()
+ E + where 42 = <function f at 0x1668410>()
+ E + and 43 = <function g at 0x1668488>()
failure_demo.py:28: AssertionError
____________________ TestFailing.test_simple_multiline _____________________
- self = <failure_demo.TestFailing object at 0x1619450>
+ self = <failure_demo.TestFailing object at 0x16ce850>
def test_simple_multiline(self):
otherfunc_multi(
@@ -66,19 +66,19 @@
failure_demo.py:11: AssertionError
___________________________ TestFailing.test_not ___________________________
- self = <failure_demo.TestFailing object at 0x1619090>
+ self = <failure_demo.TestFailing object at 0x16ce350>
def test_not(self):
def f():
return 42
> assert not f()
E assert not 42
- E + where 42 = <function f at 0x15ba668>()
+ E + where 42 = <function f at 0x1668758>()
failure_demo.py:38: AssertionError
_________________ TestSpecialisedExplanations.test_eq_text _________________
- self = <failure_demo.TestSpecialisedExplanations object at 0x1619c10>
+ self = <failure_demo.TestSpecialisedExplanations object at 0x16ceb90>
def test_eq_text(self):
> assert 'spam' == 'eggs'
@@ -89,7 +89,7 @@
failure_demo.py:42: AssertionError
_____________ TestSpecialisedExplanations.test_eq_similar_text _____________
- self = <failure_demo.TestSpecialisedExplanations object at 0x1613190>
+ self = <failure_demo.TestSpecialisedExplanations object at 0x1677190>
def test_eq_similar_text(self):
> assert 'foo 1 bar' == 'foo 2 bar'
@@ -102,7 +102,7 @@
failure_demo.py:45: AssertionError
____________ TestSpecialisedExplanations.test_eq_multiline_text ____________
- self = <failure_demo.TestSpecialisedExplanations object at 0x16131d0>
+ self = <failure_demo.TestSpecialisedExplanations object at 0x1677210>
def test_eq_multiline_text(self):
> assert 'foo\nspam\nbar' == 'foo\neggs\nbar'
@@ -115,7 +115,7 @@
failure_demo.py:48: AssertionError
______________ TestSpecialisedExplanations.test_eq_long_text _______________
- self = <failure_demo.TestSpecialisedExplanations object at 0x1613c90>
+ self = <failure_demo.TestSpecialisedExplanations object at 0x1677c50>
def test_eq_long_text(self):
a = '1'*100 + 'a' + '2'*100
@@ -132,7 +132,7 @@
failure_demo.py:53: AssertionError
_________ TestSpecialisedExplanations.test_eq_long_text_multiline __________
- self = <failure_demo.TestSpecialisedExplanations object at 0x16130d0>
+ self = <failure_demo.TestSpecialisedExplanations object at 0x166ef10>
def test_eq_long_text_multiline(self):
a = '1\n'*100 + 'a' + '2\n'*100
@@ -156,7 +156,7 @@
failure_demo.py:58: AssertionError
_________________ TestSpecialisedExplanations.test_eq_list _________________
- self = <failure_demo.TestSpecialisedExplanations object at 0x15b98d0>
+ self = <failure_demo.TestSpecialisedExplanations object at 0x166e210>
def test_eq_list(self):
> assert [0, 1, 2] == [0, 1, 3]
@@ -166,7 +166,7 @@
failure_demo.py:61: AssertionError
______________ TestSpecialisedExplanations.test_eq_list_long _______________
- self = <failure_demo.TestSpecialisedExplanations object at 0x15b9dd0>
+ self = <failure_demo.TestSpecialisedExplanations object at 0x166e490>
def test_eq_list_long(self):
a = [0]*100 + [1] + [3]*100
@@ -178,7 +178,7 @@
failure_demo.py:66: AssertionError
_________________ TestSpecialisedExplanations.test_eq_dict _________________
- self = <failure_demo.TestSpecialisedExplanations object at 0x15b99d0>
+ self = <failure_demo.TestSpecialisedExplanations object at 0x166ebd0>
def test_eq_dict(self):
> assert {'a': 0, 'b': 1} == {'a': 0, 'b': 2}
@@ -191,7 +191,7 @@
failure_demo.py:69: AssertionError
_________________ TestSpecialisedExplanations.test_eq_set __________________
- self = <failure_demo.TestSpecialisedExplanations object at 0x15b92d0>
+ self = <failure_demo.TestSpecialisedExplanations object at 0x166e850>
def test_eq_set(self):
> assert set([0, 10, 11, 12]) == set([0, 20, 21])
@@ -207,7 +207,7 @@
failure_demo.py:72: AssertionError
_____________ TestSpecialisedExplanations.test_eq_longer_list ______________
- self = <failure_demo.TestSpecialisedExplanations object at 0x15b9850>
+ self = <failure_demo.TestSpecialisedExplanations object at 0x166e590>
def test_eq_longer_list(self):
> assert [1,2] == [1,2,3]
@@ -217,7 +217,7 @@
failure_demo.py:75: AssertionError
_________________ TestSpecialisedExplanations.test_in_list _________________
- self = <failure_demo.TestSpecialisedExplanations object at 0x15b9410>
+ self = <failure_demo.TestSpecialisedExplanations object at 0x166a0d0>
def test_in_list(self):
> assert 1 in [0, 2, 3, 4, 5]
@@ -226,7 +226,7 @@
failure_demo.py:78: AssertionError
__________ TestSpecialisedExplanations.test_not_in_text_multiline __________
- self = <failure_demo.TestSpecialisedExplanations object at 0x15b0b90>
+ self = <failure_demo.TestSpecialisedExplanations object at 0x166a9d0>
def test_not_in_text_multiline(self):
text = 'some multiline\ntext\nwhich\nincludes foo\nand a\ntail'
@@ -244,7 +244,7 @@
failure_demo.py:82: AssertionError
___________ TestSpecialisedExplanations.test_not_in_text_single ____________
- self = <failure_demo.TestSpecialisedExplanations object at 0x15b0e50>
+ self = <failure_demo.TestSpecialisedExplanations object at 0x166af50>
def test_not_in_text_single(self):
text = 'single foo line'
@@ -257,7 +257,7 @@
failure_demo.py:86: AssertionError
_________ TestSpecialisedExplanations.test_not_in_text_single_long _________
- self = <failure_demo.TestSpecialisedExplanations object at 0x15b0690>
+ self = <failure_demo.TestSpecialisedExplanations object at 0x166a810>
def test_not_in_text_single_long(self):
text = 'head ' * 50 + 'foo ' + 'tail ' * 20
@@ -270,7 +270,7 @@
failure_demo.py:90: AssertionError
______ TestSpecialisedExplanations.test_not_in_text_single_long_term _______
- self = <failure_demo.TestSpecialisedExplanations object at 0x15b0f50>
+ self = <failure_demo.TestSpecialisedExplanations object at 0x166a210>
def test_not_in_text_single_long_term(self):
text = 'head ' * 50 + 'f'*70 + 'tail ' * 20
@@ -289,7 +289,7 @@
i = Foo()
> assert i.b == 2
E assert 1 == 2
- E + where 1 = <failure_demo.Foo object at 0x15b0990>.b
+ E + where 1 = <failure_demo.Foo object at 0x166a8d0>.b
failure_demo.py:101: AssertionError
_________________________ test_attribute_instance __________________________
@@ -299,8 +299,8 @@
b = 1
> assert Foo().b == 2
E assert 1 == 2
- E + where 1 = <failure_demo.Foo object at 0x15b0390>.b
- E + where <failure_demo.Foo object at 0x15b0390> = <class 'failure_demo.Foo'>()
+ E + where 1 = <failure_demo.Foo object at 0x166ab90>.b
+ E + where <failure_demo.Foo object at 0x166ab90> = <class 'failure_demo.Foo'>()
failure_demo.py:107: AssertionError
__________________________ test_attribute_failure __________________________
@@ -316,7 +316,7 @@
failure_demo.py:116:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <failure_demo.Foo object at 0x15b03d0>
+ self = <failure_demo.Foo object at 0x1837890>
def _get_b(self):
> raise Exception('Failed to get attrib')
@@ -332,15 +332,15 @@
b = 2
> assert Foo().b == Bar().b
E assert 1 == 2
- E + where 1 = <failure_demo.Foo object at 0x15b04d0>.b
- E + where <failure_demo.Foo object at 0x15b04d0> = <class 'failure_demo.Foo'>()
- E + and 2 = <failure_demo.Bar object at 0x15ac050>.b
- E + where <failure_demo.Bar object at 0x15ac050> = <class 'failure_demo.Bar'>()
+ E + where 1 = <failure_demo.Foo object at 0x166aad0>.b
+ E + where <failure_demo.Foo object at 0x166aad0> = <class 'failure_demo.Foo'>()
+ E + and 2 = <failure_demo.Bar object at 0x166acd0>.b
+ E + where <failure_demo.Bar object at 0x166acd0> = <class 'failure_demo.Bar'>()
failure_demo.py:124: AssertionError
__________________________ TestRaises.test_raises __________________________
- self = <failure_demo.TestRaises instance at 0x1627c68>
+ self = <failure_demo.TestRaises instance at 0x16dfc68>
def test_raises(self):
s = 'qwe'
@@ -352,10 +352,10 @@
> int(s)
E ValueError: invalid literal for int() with base 10: 'qwe'
- <0-codegen /home/hpk/p/pytest/.tox/regen/local/lib/python2.7/site-packages/_pytest/python.py:834>:1: ValueError
+ <0-codegen /home/hpk/p/pytest/.tox/regen/local/lib/python2.7/site-packages/_pytest/python.py:838>:1: ValueError
______________________ TestRaises.test_raises_doesnt _______________________
- self = <failure_demo.TestRaises instance at 0x16283b0>
+ self = <failure_demo.TestRaises instance at 0x16e83b0>
def test_raises_doesnt(self):
> raises(IOError, "int('3')")
@@ -364,7 +364,7 @@
failure_demo.py:136: Failed
__________________________ TestRaises.test_raise ___________________________
- self = <failure_demo.TestRaises instance at 0x161f4d0>
+ self = <failure_demo.TestRaises instance at 0x16e14d0>
def test_raise(self):
> raise ValueError("demo error")
@@ -373,7 +373,7 @@
failure_demo.py:139: ValueError
________________________ TestRaises.test_tupleerror ________________________
- self = <failure_demo.TestRaises instance at 0x161a248>
+ self = <failure_demo.TestRaises instance at 0x16d4248>
def test_tupleerror(self):
> a,b = [1]
@@ -382,7 +382,7 @@
failure_demo.py:142: ValueError
______ TestRaises.test_reinterpret_fails_with_print_for_the_fun_of_it ______
- self = <failure_demo.TestRaises instance at 0x161af80>
+ self = <failure_demo.TestRaises instance at 0x16d4f80>
def test_reinterpret_fails_with_print_for_the_fun_of_it(self):
l = [1,2,3]
@@ -395,7 +395,7 @@
l is [1, 2, 3]
________________________ TestRaises.test_some_error ________________________
- self = <failure_demo.TestRaises instance at 0x1617d88>
+ self = <failure_demo.TestRaises instance at 0x16d5d88>
def test_some_error(self):
> if namenotexi:
@@ -423,7 +423,7 @@
<2-codegen 'abc-123' /home/hpk/p/pytest/doc/en/example/assertion/failure_demo.py:162>:2: AssertionError
____________________ TestMoreErrors.test_complex_error _____________________
- self = <failure_demo.TestMoreErrors instance at 0x1628758>
+ self = <failure_demo.TestMoreErrors instance at 0x16e8758>
def test_complex_error(self):
def f():
@@ -452,7 +452,7 @@
failure_demo.py:5: AssertionError
___________________ TestMoreErrors.test_z1_unpack_error ____________________
- self = <failure_demo.TestMoreErrors instance at 0x1612d88>
+ self = <failure_demo.TestMoreErrors instance at 0x16cfd88>
def test_z1_unpack_error(self):
l = []
@@ -462,7 +462,7 @@
failure_demo.py:179: ValueError
____________________ TestMoreErrors.test_z2_type_error _____________________
- self = <failure_demo.TestMoreErrors instance at 0x1614b90>
+ self = <failure_demo.TestMoreErrors instance at 0x16d1b90>
def test_z2_type_error(self):
l = 3
@@ -472,19 +472,19 @@
failure_demo.py:183: TypeError
______________________ TestMoreErrors.test_startswith ______________________
- self = <failure_demo.TestMoreErrors instance at 0x1610998>
+ self = <failure_demo.TestMoreErrors instance at 0x16d2998>
def test_startswith(self):
s = "123"
g = "456"
> assert s.startswith(g)
- E assert <built-in method startswith of str object at 0x161db48>('456')
- E + where <built-in method startswith of str object at 0x161db48> = '123'.startswith
+ E assert <built-in method startswith of str object at 0x16dbaf8>('456')
+ E + where <built-in method startswith of str object at 0x16dbaf8> = '123'.startswith
failure_demo.py:188: AssertionError
__________________ TestMoreErrors.test_startswith_nested ___________________
- self = <failure_demo.TestMoreErrors instance at 0x16140e0>
+ self = <failure_demo.TestMoreErrors instance at 0x16d10e0>
def test_startswith_nested(self):
def f():
@@ -492,15 +492,15 @@
def g():
return "456"
> assert f().startswith(g())
- E assert <built-in method startswith of str object at 0x161db48>('456')
- E + where <built-in method startswith of str object at 0x161db48> = '123'.startswith
- E + where '123' = <function f at 0x163b848>()
- E + and '456' = <function g at 0x162d758>()
+ E assert <built-in method startswith of str object at 0x16dbaf8>('456')
+ E + where <built-in method startswith of str object at 0x16dbaf8> = '123'.startswith
+ E + where '123' = <function f at 0x16fa938>()
+ E + and '456' = <function g at 0x16ef848>()
failure_demo.py:195: AssertionError
_____________________ TestMoreErrors.test_global_func ______________________
- self = <failure_demo.TestMoreErrors instance at 0x16207a0>
+ self = <failure_demo.TestMoreErrors instance at 0x16e27a0>
def test_global_func(self):
> assert isinstance(globf(42), float)
@@ -510,18 +510,18 @@
failure_demo.py:198: AssertionError
_______________________ TestMoreErrors.test_instance _______________________
- self = <failure_demo.TestMoreErrors instance at 0x161ad88>
+ self = <failure_demo.TestMoreErrors instance at 0x16d4d88>
def test_instance(self):
self.x = 6*7
> assert self.x != 42
E assert 42 != 42
- E + where 42 = <failure_demo.TestMoreErrors instance at 0x161ad88>.x
+ E + where 42 = <failure_demo.TestMoreErrors instance at 0x16d4d88>.x
failure_demo.py:202: AssertionError
_______________________ TestMoreErrors.test_compare ________________________
- self = <failure_demo.TestMoreErrors instance at 0x160e560>
+ self = <failure_demo.TestMoreErrors instance at 0x16d0560>
def test_compare(self):
> assert globf(10) < 5
@@ -531,7 +531,7 @@
failure_demo.py:205: AssertionError
_____________________ TestMoreErrors.test_try_finally ______________________
- self = <failure_demo.TestMoreErrors instance at 0x160f3b0>
+ self = <failure_demo.TestMoreErrors instance at 0x16cb3b0>
def test_try_finally(self):
x = 1
@@ -540,4 +540,4 @@
E assert 1 == 0
failure_demo.py:210: AssertionError
- ======================== 39 failed in 0.16 seconds =========================
+ ======================== 39 failed in 0.17 seconds =========================
diff -r 72ae4efeefa55befefa2e0bbbc45586e807c4c6d -r c83169fe80e8ad641542727745a0bd4847f34c3a doc/en/example/simple.txt
--- a/doc/en/example/simple.txt
+++ b/doc/en/example/simple.txt
@@ -106,7 +106,7 @@
$ py.test
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 0 items
============================= in 0.00 seconds =============================
@@ -150,12 +150,12 @@
$ py.test -rs # "-rs" means report details on the little 's'
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 2 items
test_module.py .s
========================= short test summary info ==========================
- SKIP [1] /tmp/doc-exec-118/conftest.py:9: need --runslow option to run
+ SKIP [1] /tmp/doc-exec-179/conftest.py:9: need --runslow option to run
=================== 1 passed, 1 skipped in 0.01 seconds ====================
@@ -163,7 +163,7 @@
$ py.test --runslow
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 2 items
test_module.py ..
@@ -253,7 +253,7 @@
$ py.test
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
project deps: mylib-1.1
collected 0 items
@@ -276,7 +276,7 @@
$ py.test -v
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28 -- /home/hpk/p/pytest/.tox/regen/bin/python
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0 -- /home/hpk/p/pytest/.tox/regen/bin/python
info1: did you know that ...
did you?
collecting ... collected 0 items
@@ -287,7 +287,7 @@
$ py.test
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 0 items
============================= in 0.00 seconds =============================
@@ -319,7 +319,7 @@
$ py.test --durations=3
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 3 items
test_some_are_slow.py ...
@@ -327,7 +327,7 @@
========================= slowest 3 test durations =========================
0.20s call test_some_are_slow.py::test_funcslow2
0.10s call test_some_are_slow.py::test_funcslow1
- 0.00s setup test_some_are_slow.py::test_funcfast
+ 0.00s call test_some_are_slow.py::test_funcfast
========================= 3 passed in 0.31 seconds =========================
incremental testing - test steps
@@ -380,7 +380,7 @@
$ py.test -rx
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 4 items
test_step.py .Fx.
@@ -388,7 +388,7 @@
================================= FAILURES =================================
____________________ TestUserHandling.test_modification ____________________
- self = <test_step.TestUserHandling instance at 0x1c89638>
+ self = <test_step.TestUserHandling instance at 0x2318638>
def test_modification(self):
> assert 0
diff -r 72ae4efeefa55befefa2e0bbbc45586e807c4c6d -r c83169fe80e8ad641542727745a0bd4847f34c3a doc/en/fixture.txt
--- a/doc/en/fixture.txt
+++ b/doc/en/fixture.txt
@@ -71,7 +71,7 @@
$ py.test test_smtpsimple.py
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 1 items
test_smtpsimple.py F
@@ -79,7 +79,7 @@
================================= FAILURES =================================
________________________________ test_ehlo _________________________________
- smtp = <smtplib.SMTP instance at 0x1929d40>
+ smtp = <smtplib.SMTP instance at 0x14d2e18>
def test_ehlo(smtp):
response, msg = smtp.ehlo()
@@ -89,7 +89,7 @@
E assert 0
test_smtpsimple.py:12: AssertionError
- ========================= 1 failed in 0.25 seconds =========================
+ ========================= 1 failed in 0.54 seconds =========================
In the failure traceback we see that the test function was called with a
``smtp`` argument, the ``smtplib.SMTP()`` instance created by the fixture
@@ -187,7 +187,7 @@
$ py.test test_module.py
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 2 items
test_module.py FF
@@ -195,7 +195,7 @@
================================= FAILURES =================================
________________________________ test_ehlo _________________________________
- smtp = <smtplib.SMTP instance at 0x135f3b0>
+ smtp = <smtplib.SMTP instance at 0x27f63b0>
def test_ehlo(smtp):
response = smtp.ehlo()
@@ -207,7 +207,7 @@
test_module.py:6: AssertionError
________________________________ test_noop _________________________________
- smtp = <smtplib.SMTP instance at 0x135f3b0>
+ smtp = <smtplib.SMTP instance at 0x27f63b0>
def test_noop(smtp):
response = smtp.noop()
@@ -216,7 +216,7 @@
E assert 0
test_module.py:11: AssertionError
- ========================= 2 failed in 0.22 seconds =========================
+ ========================= 2 failed in 0.21 seconds =========================
You see the two ``assert 0`` failing and more importantly you can also see
that the same (session-scoped) ``smtp`` object was passed into the two
@@ -258,7 +258,7 @@
$ py.test -s -q --tb=no
FF
- finalizing <smtplib.SMTP instance at 0x2279758>
+ finalizing <smtplib.SMTP instance at 0x1497758>
We see that the ``smtp`` instance is finalized after the two
tests using it tests executed. If we had specified ``scope='function'``
@@ -283,7 +283,7 @@
______________________________ test_showhelo _______________________________
test_anothersmtp.py:5: in test_showhelo
> assert 0, smtp.helo()
- E AssertionError: (250, 'hq.merlinux.eu')
+ E AssertionError: (250, 'mail.python.org')
.. _`request`: :py:class:`_pytest.python.FixtureRequest`
@@ -328,7 +328,7 @@
================================= FAILURES =================================
__________________________ test_ehlo[merlinux.eu] __________________________
- smtp = <smtplib.SMTP instance at 0x1f5f680>
+ smtp = <smtplib.SMTP instance at 0x1742680>
def test_ehlo(smtp):
response = smtp.ehlo()
@@ -340,7 +340,7 @@
test_module.py:6: AssertionError
__________________________ test_noop[merlinux.eu] __________________________
- smtp = <smtplib.SMTP instance at 0x1f5f680>
+ smtp = <smtplib.SMTP instance at 0x1742680>
def test_noop(smtp):
response = smtp.noop()
@@ -351,7 +351,7 @@
test_module.py:11: AssertionError
________________________ test_ehlo[mail.python.org] ________________________
- smtp = <smtplib.SMTP instance at 0x1fdffc8>
+ smtp = <smtplib.SMTP instance at 0x174bfc8>
def test_ehlo(smtp):
response = smtp.ehlo()
@@ -362,7 +362,7 @@
test_module.py:5: AssertionError
________________________ test_noop[mail.python.org] ________________________
- smtp = <smtplib.SMTP instance at 0x1fdffc8>
+ smtp = <smtplib.SMTP instance at 0x174bfc8>
def test_noop(smtp):
response = smtp.noop()
@@ -410,13 +410,13 @@
$ py.test -v test_appsetup.py
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28 -- /home/hpk/p/pytest/.tox/regen/bin/python
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0 -- /home/hpk/p/pytest/.tox/regen/bin/python
collecting ... collected 2 items
test_appsetup.py:12: test_smtp_exists[merlinux.eu] PASSED
test_appsetup.py:12: test_smtp_exists[mail.python.org] PASSED
- ========================= 2 passed in 0.11 seconds =========================
+ ========================= 2 passed in 0.25 seconds =========================
Due to the parametrization of ``smtp`` the test will run twice with two
different ``App`` instances and respective smtp servers. There is no
@@ -472,7 +472,7 @@
$ py.test -v -s test_module.py
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28 -- /home/hpk/p/pytest/.tox/regen/bin/python
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0 -- /home/hpk/p/pytest/.tox/regen/bin/python
collecting ... collected 8 items
test_module.py:16: test_0[1] PASSED
diff -r 72ae4efeefa55befefa2e0bbbc45586e807c4c6d -r c83169fe80e8ad641542727745a0bd4847f34c3a doc/en/getting-started.txt
--- a/doc/en/getting-started.txt
+++ b/doc/en/getting-started.txt
@@ -23,7 +23,7 @@
To check your installation has installed the correct version::
$ py.test --version
- This is py.test version 2.3.0.dev28, imported from /home/hpk/p/pytest/.tox/regen/local/lib/python2.7/site-packages/pytest.pyc
+ This is py.test version 2.3.0, imported from /home/hpk/p/pytest/.tox/regen/local/lib/python2.7/site-packages/pytest.pyc
If you get an error checkout :ref:`installation issues`.
@@ -45,7 +45,7 @@
$ py.test
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 1 items
test_sample.py F
@@ -122,7 +122,7 @@
================================= FAILURES =================================
____________________________ TestClass.test_two ____________________________
- self = <test_class.TestClass instance at 0x261e6c8>
+ self = <test_class.TestClass instance at 0x1ab56c8>
def test_two(self):
x = "hello"
@@ -157,7 +157,7 @@
================================= FAILURES =================================
_____________________________ test_needsfiles ______________________________
- tmpdir = local('/tmp/pytest-990/test_needsfiles0')
+ tmpdir = local('/tmp/pytest-1351/test_needsfiles0')
def test_needsfiles(tmpdir):
print tmpdir
@@ -166,7 +166,7 @@
test_tmpdir.py:3: AssertionError
----------------------------- Captured stdout ------------------------------
- /tmp/pytest-990/test_needsfiles0
+ /tmp/pytest-1351/test_needsfiles0
Before the test runs, a unique-per-test-invocation temporary directory
was created. More info at :ref:`tmpdir handling`.
diff -r 72ae4efeefa55befefa2e0bbbc45586e807c4c6d -r c83169fe80e8ad641542727745a0bd4847f34c3a doc/en/parametrize.txt
--- a/doc/en/parametrize.txt
+++ b/doc/en/parametrize.txt
@@ -53,7 +53,7 @@
$ py.test
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 3 items
test_expectation.py ..F
@@ -135,8 +135,8 @@
def test_valid_string(stringinput):
> assert stringinput.isalpha()
- E assert <built-in method isalpha of str object at 0x2b1b676af030>()
- E + where <built-in method isalpha of str object at 0x2b1b676af030> = '!'.isalpha
+ E assert <built-in method isalpha of str object at 0x2b3ae7eb8030>()
+ E + where <built-in method isalpha of str object at 0x2b3ae7eb8030> = '!'.isalpha
test_strings.py:3: AssertionError
@@ -149,7 +149,7 @@
$ py.test -q -rs test_strings.py
s
========================= short test summary info ==========================
- SKIP [1] /home/hpk/p/pytest/.tox/regen/local/lib/python2.7/site-packages/_pytest/python.py:943: got empty parameter set, function test_valid_string at /tmp/doc-exec-84/test_strings.py:1
+ SKIP [1] /home/hpk/p/pytest/.tox/regen/local/lib/python2.7/site-packages/_pytest/python.py:947: got empty parameter set, function test_valid_string at /tmp/doc-exec-145/test_strings.py:1
For further examples, you might want to look at :ref:`more
parametrization examples <paramexamples>`.
diff -r 72ae4efeefa55befefa2e0bbbc45586e807c4c6d -r c83169fe80e8ad641542727745a0bd4847f34c3a doc/en/skipping.txt
--- a/doc/en/skipping.txt
+++ b/doc/en/skipping.txt
@@ -132,7 +132,7 @@
example $ py.test -rx xfail_demo.py
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 6 items
xfail_demo.py xxxxxx
diff -r 72ae4efeefa55befefa2e0bbbc45586e807c4c6d -r c83169fe80e8ad641542727745a0bd4847f34c3a doc/en/tmpdir.txt
--- a/doc/en/tmpdir.txt
+++ b/doc/en/tmpdir.txt
@@ -29,7 +29,7 @@
$ py.test test_tmpdir.py
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 1 items
test_tmpdir.py F
@@ -37,7 +37,7 @@
================================= FAILURES =================================
_____________________________ test_create_file _____________________________
- tmpdir = local('/tmp/pytest-991/test_create_file0')
+ tmpdir = local('/tmp/pytest-1352/test_create_file0')
def test_create_file(tmpdir):
p = tmpdir.mkdir("sub").join("hello.txt")
@@ -48,7 +48,7 @@
E assert 0
test_tmpdir.py:7: AssertionError
- ========================= 1 failed in 0.07 seconds =========================
+ ========================= 1 failed in 0.03 seconds =========================
.. _`base temporary directory`:
diff -r 72ae4efeefa55befefa2e0bbbc45586e807c4c6d -r c83169fe80e8ad641542727745a0bd4847f34c3a doc/en/unittest.txt
--- a/doc/en/unittest.txt
+++ b/doc/en/unittest.txt
@@ -88,7 +88,7 @@
$ py.test test_unittest_db.py
=========================== test session starts ============================
- platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev28
+ platform linux2 -- Python 2.7.3 -- pytest-2.3.0
collected 2 items
test_unittest_db.py FF
@@ -101,7 +101,7 @@
def test_method1(self):
assert hasattr(self, "db")
> assert 0, self.db # fail for demo purposes
- E AssertionError: <conftest.DummyDB instance at 0x26ccbd8>
+ E AssertionError: <conftest.DummyDB instance at 0x1276bd8>
test_unittest_db.py:9: AssertionError
___________________________ MyTest.test_method2 ____________________________
@@ -110,7 +110,7 @@
def test_method2(self):
> assert 0, self.db # fail for demo purposes
- E AssertionError: <conftest.DummyDB instance at 0x26ccbd8>
+ E AssertionError: <conftest.DummyDB instance at 0x1276bd8>
test_unittest_db.py:12: AssertionError
========================= 2 failed in 0.02 seconds =========================
diff -r 72ae4efeefa55befefa2e0bbbc45586e807c4c6d -r c83169fe80e8ad641542727745a0bd4847f34c3a setup.py
--- a/setup.py
+++ b/setup.py
@@ -24,7 +24,7 @@
name='pytest',
description='py.test: simple powerful testing with Python',
long_description = long_description,
- version='2.3.0.dev33',
+ version='2.3.0',
url='http://pytest.org',
license='MIT license',
platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],
@@ -32,7 +32,7 @@
author_email='holger at merlinux.eu',
entry_points= make_entry_points(),
# the following should be enabled for release
- install_requires=['py>=1.4.8'],
+ install_requires=['py>=1.4.10'],
classifiers=['Development Status :: 6 - Mature',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
diff -r 72ae4efeefa55befefa2e0bbbc45586e807c4c6d -r c83169fe80e8ad641542727745a0bd4847f34c3a testing/test_junitxml.py
--- a/testing/test_junitxml.py
+++ b/testing/test_junitxml.py
@@ -171,7 +171,7 @@
assert_attr(node, failures=3, tests=3)
for index, char in enumerate("<&'"):
-
+
tnode = node.getElementsByTagName("testcase")[index]
assert_attr(tnode,
classname="test_failure_escape",
@@ -270,7 +270,7 @@
def test_unicode(self, testdir):
value = 'hx\xc4\x85\xc4\x87\n'
testdir.makepyfile("""
- # coding: utf-8
+ # coding: latin1
def test_hello():
print (%r)
assert 0
Repository URL: https://bitbucket.org/hpk42/pytest/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the pytest-commit
mailing list