testing_utils
get_Project
get_Project()
A pytest fixture that gets a clean version of the Project class, with caches and other class attributes appropriately reset.
Source code in cassini/testing_utils.py
19 20 21 22 23 24 25 26 27 28 29 30 31 |
|
patch_project
patch_project(get_Project, tmp_path)
A pytest fixture that returns a simple preconfigured project
.
Source code in cassini/testing_utils.py
34 35 36 37 38 39 40 41 42 43 44 45 |
|
patched_default_project
patched_default_project(get_Project, tmp_path)
A pytest fixture that provides a factory for setting up a project with the default configuration.
Returns:
Name | Type | Description |
---|---|---|
project |
Project
|
The fresh project instance. |
create_tiers |
Callable[[Sequence[str]], Sequence[TierABC]]
|
function for creating tiers by a list of names. Returns each pre-setup tier in order. |
Example
def test_something(patched_default_project):
project, make_tiers = patched_default_project
WP1, = make_tiers(['WP1'])
Source code in cassini/testing_utils.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
|