April 2016
Intermediate to advanced
486 pages
9h 21m
English
In Chapter 10, Testing and Logging – Preparing for Bugs, the testing chapter, we saw a few of the many testing systems for Python. As you might suspect, at least some of these have setup.py integration.
Before we start, we should create a test script for our package. For actual tests, look at Chapter 10, Testing and Logging – Preparing for Bugs, the testing chapter. In this case, we will just use a no-op test, test.py:
import unittest
class Test(unittest.TestCase):
def test(self):
passThe standard python setup.py test command will run the regular unittest command:
# python setup.py -v test running test running "unittest --verbose" running egg_info writing Our_little_project.egg-info/PKG-INFO writing dependency_links to Our_little_project.egg-info/dependency_links.txt ...
Read now
Unlock full access