utKit (class) ∞
-
class
utKit
(moduleDirectory)[source] ∞ Bases:
object
Default 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()
Methods
get_project_root
()Get the root of the ``python`` package - useful for getting files in the root directory of a project
refresh_database
()Refresh the unit test database
setupModule
()The setupModule method
tearDownModule
()The tearDownModule method
-
get_project_root
()[source] ∞ Get the root of the ``python`` package - useful for getting files in the root directory of a project
Return
rootPath
– the root path of a project