| 1 | import pytest |
| 2 | |
| 3 | |
| 4 | def pytest_runtest_setup(item): |
| 5 | for mark in item.iter_markers(): |
| 6 | if mark.name == 'pbcore': |
| 7 | try: |
| 8 | import pbcore |
| 9 | except ImportError: |
| 10 | pytest.skip("'pbcore' not installed") |
| 11 | elif mark.name == 'pbtestdata': |
| 12 | try: |
| 13 | import pbtestdata |
| 14 | except ImportError: |
| 15 | pytest.skip("'pbtestdata' not installed") |
| 16 | elif mark.name == "skipif": |
| 17 | pass |
| 18 | else: |
| 19 | raise LookupError("Unknown pytest mark: '{}'".format(mark.name)) |