-
Notifications
You must be signed in to change notification settings - Fork 10
Replacing qutil Components
The qspec framework depends on the qutil package in several places. Primarily this is for loading files from the framework, but it also uses certain functionality for identifying loaded test files to aid in locating fixtures. The test runner also uses the options parsing functionality in place of .Q.opt
If you would like to replace the usage of these components, do a search for .utl
within the project directory. All calls to .utl.require
should be replaced with a different function that will load a path. .utl.PKGLOADING
is a related value which indicates to the .utl.require
function which path to load source files from, this should either be replaced entirely with something that works with your package loading facility or an absolute path should be used.
In order to support fixture lookups within the same path as a test file, the function that replaces .utl.require
should set some global variable that indicates which path a test file is being loaded at. This variable should replace .utl.FILELOADING
In the test runner replace .utl.addOpt
and .utl.addArg
references with whatever option/argument handling facility you would like to use.
Note: I generally do not recommend going to this length. Unless you absolutely cannot use the qutil package, please consider using it. It should be possible to have qutil interoperate with your existing packaging system.