diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2021-01-14 20:29:14 -0500 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2021-01-14 20:29:14 -0500 |
| commit | b9f3e47f3a4010d8ea3179db7e6b602a40e349cb (patch) | |
| tree | 5a464c524bd8e24c3260ee494046012f8b9e1d88 /tests/topotests/pim-basic/test_pim.py | |
| parent | 9fad1340d4ce7798f843c70826dd1629fec6ddcb (diff) | |
tests: Start the ability to mark tests
Add the ability for our topotests to take advantage of pytest `mark`ing.
This effectively allows you to tell pytest to run against certain sets
of tests. For a demonstration purpose I've added in marks for:
babel
eigrp
ldp
ospf
pim
rip
And setup tests to run against those tests that only test those protocols.
You can run against eigrp tests by running `pytest -k eigrp`
Other combinations are also available based upon simple boolean logic.
Just read the pytest.mark documentation.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'tests/topotests/pim-basic/test_pim.py')
| -rw-r--r-- | tests/topotests/pim-basic/test_pim.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/topotests/pim-basic/test_pim.py b/tests/topotests/pim-basic/test_pim.py index e8a9f72b48..74a7fbf16e 100644 --- a/tests/topotests/pim-basic/test_pim.py +++ b/tests/topotests/pim-basic/test_pim.py @@ -80,7 +80,7 @@ class PIMTopo(Topo): sw.add_link(tgen.gears["r1"]) sw.add_link(tgen.gears["r3"]) - +@pytest.mark.pim def setup_module(mod): "Sets up the pytest environment" tgen = Topogen(PIMTopo, mod.__name__) |
