SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

 
 

python2-testtools rpm build for : OpenSuSE. For other distributions click python2-testtools.

Name : python2-testtools
Version : 2.2.0 Vendor : obs://build_opensuse_org/home:tbechtold
Release : 2.24 Date : 2018-10-29 16:38:17
Group : Development/Languages/Python Source RPM : python-testtools-2.2.0-2.24.src.rpm
Size : 2.57 MB
Packager : (none)
Summary : Extensions to the Python Standard Library Unit Testing Framework
Description :
======================================
testtools: tasteful testing for Python
======================================

testtools is a set of extensions to the Python standard library\'s unit testing
framework. These extensions have been derived from many years of experience
with unit testing in Python and come from many different sources.

What better way to start than with a contrived code snippet?::

from testtools import TestCase
from testtools.content import Content
from testtools.content_type import UTF8_TEXT
from testtools.matchers import Equals

from myproject import SillySquareServer

class TestSillySquareServer(TestCase):

def setUp(self):
super(TestSillySquareServer, self).setUp()
self.server = self.useFixture(SillySquareServer())
self.addCleanup(self.attach_log_file)

def attach_log_file(self):
self.addDetail(
\'log-file\',
Content(UTF8_TEXT,
lambda: open(self.server.logfile, \'r\').readlines()))

def test_server_is_cool(self):
self.assertThat(self.server.temperature, Equals(\"cool\"))

def test_square(self):
self.assertThat(self.server.silly_square_of(7), Equals(49))


Why use testtools?
==================

Better assertion methods
------------------------

The standard assertion methods that come with unittest aren\'t as helpful as
they could be, and there aren\'t quite enough of them. testtools adds
``assertIn``, ``assertIs``, ``assertIsInstance`` and their negatives.


Matchers: better than assertion methods
---------------------------------------

Of course, in any serious project you want to be able to have assertions that
are specific to that project and the particular problem that it is addressing.
Rather than forcing you to define your own assertion methods and maintain your
own inheritance hierarchy of ``TestCase`` classes, testtools lets you write
your own \"matchers\", custom predicates that can be plugged into a unit test::

def test_response_has_bold(self):

response = self.server.getResponse()
self.assertThat(response, HTMLContains(Tag(\'bold\', \'b\')))


More debugging info, when you need it
--------------------------------------

testtools makes it easy to add arbitrary data to your test result. If you
want to know what\'s in a log file when a test fails, or what the load was on
the computer when a test started, or what files were open, you can add that
information with ``TestCase.addDetail``, and it will appear in the test
results if that test fails.


Extend unittest, but stay compatible and re-usable
--------------------------------------------------

testtools goes to great lengths to allow serious test authors and test
*framework* authors to do whatever they like with their tests and their
extensions while staying compatible with the standard library\'s unittest.

testtools has completely parametrized how exceptions raised in tests are
mapped to ``TestResult`` methods and how tests are actually executed (ever
wanted ``tearDown`` to be called regardless of whether ``setUp`` succeeds?)

It also provides many simple but handy utilities, like the ability to clone a
test, a ``MultiTestResult`` object that lets many result objects get the
results from one test suite, adapters to bring legacy ``TestResult`` objects
into our new golden age.


Cross-Python compatibility
--------------------------

testtools gives you the very latest in unit testing technology in a way that
will work with Python 2.7, 3.3, 3.4, 3.5, and pypy.

If you wish to use testtools with Python 2.4 or 2.5, then please use testtools
0.9.15.

If you wish to use testtools with Python 2.6 or 3.2, then please use testtools
1.9.0.

RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/home:/tbechtold:/py2pack-testing/standard/noarch

Content of RPM  Changelog  Provides Requires

Hmm ... It's impossible ;-) This RPM doesn't exist on any FTP server

Provides :
python-testtools
python2-testtools

Requires :
python(abi) = 2.7
python2-extras >= 1.0.0
python2-fixtures >= 1.3.0
python2-pbr >= 0.11
python2-python-mimeparse
python2-six >= 1.4.0
python2-traceback2
python2-unittest2 >= 1.0.0
python3-extras >= 1.0.0
python3-fixtures >= 1.3.0
python3-pbr >= 0.11
python3-python-mimeparse
python3-six >= 1.4.0
python3-traceback2
python3-unittest2 >= 1.0.0
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1


Content of RPM :
/usr/lib/python2.7/site-packages/testtools
/usr/lib/python2.7/site-packages/testtools-2.2.0-py2.7.egg-info
/usr/lib/python2.7/site-packages/testtools-2.2.0-py2.7.egg-info/PKG-INFO
/usr/lib/python2.7/site-packages/testtools-2.2.0-py2.7.egg-info/SOURCES.txt
/usr/lib/python2.7/site-packages/testtools-2.2.0-py2.7.egg-info/dependency_links.txt
/usr/lib/python2.7/site-packages/testtools-2.2.0-py2.7.egg-info/not-zip-safe
/usr/lib/python2.7/site-packages/testtools-2.2.0-py2.7.egg-info/pbr.json
/usr/lib/python2.7/site-packages/testtools-2.2.0-py2.7.egg-info/requires.txt
/usr/lib/python2.7/site-packages/testtools-2.2.0-py2.7.egg-info/top_level.txt
/usr/lib/python2.7/site-packages/testtools/__init__.py
/usr/lib/python2.7/site-packages/testtools/__init__.pyc
/usr/lib/python2.7/site-packages/testtools/__init__.pyo
/usr/lib/python2.7/site-packages/testtools/_compat2x.py
/usr/lib/python2.7/site-packages/testtools/_compat2x.pyc
/usr/lib/python2.7/site-packages/testtools/_compat2x.pyo
/usr/lib/python2.7/site-packages/testtools/_compat3x.py
/usr/lib/python2.7/site-packages/testtools/_compat3x.pyc
/usr/lib/python2.7/site-packages/testtools/_compat3x.pyo
/usr/lib/python2.7/site-packages/testtools/assertions.py
/usr/lib/python2.7/site-packages/testtools/assertions.pyc
/usr/lib/python2.7/site-packages/testtools/assertions.pyo
/usr/lib/python2.7/site-packages/testtools/compat.py
/usr/lib/python2.7/site-packages/testtools/compat.pyc
/usr/lib/python2.7/site-packages/testtools/compat.pyo
/usr/lib/python2.7/site-packages/testtools/content.py
/usr/lib/python2.7/site-packages/testtools/content.pyc
/usr/lib/python2.7/site-packages/testtools/content.pyo
/usr/lib/python2.7/site-packages/testtools/content_type.py
/usr/lib/python2.7/site-packages/testtools/content_type.pyc
/usr/lib/python2.7/site-packages/testtools/content_type.pyo
There is 210 files more in these RPM.

 
ICM