last changes, preparing 2.0.0
This commit is contained in:
parent
9e7ef58cfd
commit
b622c85bbf
|
@ -257,6 +257,9 @@ class TerminalReporter:
|
||||||
self.write_sep("=", "test session starts", bold=True)
|
self.write_sep("=", "test session starts", bold=True)
|
||||||
verinfo = ".".join(map(str, sys.version_info[:3]))
|
verinfo = ".".join(map(str, sys.version_info[:3]))
|
||||||
msg = "platform %s -- Python %s" % (sys.platform, verinfo)
|
msg = "platform %s -- Python %s" % (sys.platform, verinfo)
|
||||||
|
if hasattr(sys, 'pypy_version_info'):
|
||||||
|
verinfo = ".".join(map(str, sys.pypy_version_info[:3]))
|
||||||
|
msg += "[pypy-%s]" % verinfo
|
||||||
msg += " -- pytest-%s" % (py.test.__version__)
|
msg += " -- pytest-%s" % (py.test.__version__)
|
||||||
if self.verbosity > 0 or self.config.option.debug or \
|
if self.verbosity > 0 or self.config.option.debug or \
|
||||||
getattr(self.config.option, 'pastebin', None):
|
getattr(self.config.option, 'pastebin', None):
|
||||||
|
|
|
@ -41,7 +41,7 @@ New Features
|
||||||
- new and better reporting information in assert expressions
|
- new and better reporting information in assert expressions
|
||||||
if comparing lists, sequences or strings.
|
if comparing lists, sequences or strings.
|
||||||
|
|
||||||
see http://pytest.org/2.0.0/assert.html for details.
|
see http://pytest.org/2.0.0/assert.html#newreport
|
||||||
|
|
||||||
- new configuration through ini-files (setup.cfg or tox.ini recognized),
|
- new configuration through ini-files (setup.cfg or tox.ini recognized),
|
||||||
for example::
|
for example::
|
||||||
|
|
|
@ -84,6 +84,8 @@ asserts that the given ``ExpectedException`` is raised. The reporter will
|
||||||
provide you with helpful output in case of failures such as *no
|
provide you with helpful output in case of failures such as *no
|
||||||
exception* or *wrong exception*.
|
exception* or *wrong exception*.
|
||||||
|
|
||||||
|
.. _newreport:
|
||||||
|
|
||||||
Making use of context-sensitive comparisons
|
Making use of context-sensitive comparisons
|
||||||
-------------------------------------------------
|
-------------------------------------------------
|
||||||
|
|
||||||
|
@ -130,7 +132,7 @@ Special comparisons are done for a number of cases:
|
||||||
* comparing long sequences: first failing indices
|
* comparing long sequences: first failing indices
|
||||||
* comparing dicts: different entries
|
* comparing dicts: different entries
|
||||||
|
|
||||||
See the :ref:`reporting demo <reportingdemo>` for examples.
|
See the :ref:`reporting demo <tbreportdemo>` for many more examples.
|
||||||
|
|
||||||
..
|
..
|
||||||
Defining your own comparison
|
Defining your own comparison
|
||||||
|
|
|
@ -7,7 +7,9 @@ Demo of Python failure reports with py.test
|
||||||
Here is a nice run of several tens of failures
|
Here is a nice run of several tens of failures
|
||||||
and how py.test presents things (unfortunately
|
and how py.test presents things (unfortunately
|
||||||
not showing the nice colors here in the HTML that you
|
not showing the nice colors here in the HTML that you
|
||||||
get on the terminal - we are working on that)::
|
get on the terminal - we are working on that):
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
assertion $ py.test failure_demo.py
|
assertion $ py.test failure_demo.py
|
||||||
=========================== test session starts ============================
|
=========================== test session starts ============================
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
"""
|
"""
|
||||||
unit and functional testing with Python.
|
unit and functional testing with Python.
|
||||||
"""
|
"""
|
||||||
__version__ = '2.0.0.dev42'
|
__version__ = '2.0.0'
|
||||||
__all__ = ['main']
|
__all__ = ['main']
|
||||||
|
|
||||||
from _pytest.core import main, UsageError, _preloadplugins
|
from _pytest.core import main, UsageError, _preloadplugins
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -22,7 +22,7 @@ def main():
|
||||||
name='pytest',
|
name='pytest',
|
||||||
description='py.test: simple powerful testing with Python',
|
description='py.test: simple powerful testing with Python',
|
||||||
long_description = long_description,
|
long_description = long_description,
|
||||||
version='2.0.0.dev42',
|
version='2.0.0',
|
||||||
url='http://pytest.org',
|
url='http://pytest.org',
|
||||||
license='MIT license',
|
license='MIT license',
|
||||||
platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],
|
platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],
|
||||||
|
|
|
@ -77,6 +77,7 @@ class TestCaptureManager:
|
||||||
finally:
|
finally:
|
||||||
capouter.reset()
|
capouter.reset()
|
||||||
|
|
||||||
|
@pytest.mark.xfail("hasattr(sys, 'pypy_version_info')")
|
||||||
@pytest.mark.multi(method=['fd', 'sys'])
|
@pytest.mark.multi(method=['fd', 'sys'])
|
||||||
def test_capturing_unicode(testdir, method):
|
def test_capturing_unicode(testdir, method):
|
||||||
if sys.version_info >= (3,0):
|
if sys.version_info >= (3,0):
|
||||||
|
|
Loading…
Reference in New Issue