fundamentals.utKit¶
A unit-testing kit to simplify my unit-tests
- Author
David Young
Module Contents¶
Classes¶
Default setup for fundamentals style unit-testing workflow (all tests base on nose module) |
API¶
- class fundamentals.utKit.utKit(moduleDirectory)[source][source]¶
Bases:
objectDefault setup for fundamentals style unit-testing workflow (all tests base on nose module)
Key Arguments
moduleDirectory– the directory to the unit-testing test file
Usage
To use this kit within any of your unit-test modules add the following code before your test methods:
from fundamentals.utKit import utKit # SETUP AND TEARDOWN FIXTURE FUNCTIONS FOR THE ENTIRE MODULE moduleDirectory = os.path.dirname(__file__) utKit = utKit(moduleDirectory) log, dbConn, pathToInputDir, pathToOutputDir = utKit.setupModule() utKit.tearDownModule()
Initialization
- get_project_root()[source][source]¶
Get the root of the
pythonpackage - useful for getting files in the root directory of a projectReturn
rootPath– the root path of a project