File: conftest.py

package info (click to toggle)
python-xmlsec 1.3.14-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 656 kB
  • sloc: ansic: 4,118; python: 2,045; xml: 461; makefile: 4
file content (11 lines) | stat: -rw-r--r-- 378 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
def pytest_collection_modifyitems(items):
    """
    Put the module init test first.

    This way, we implicitly check whether any subsequent test fails because of module reinitialization.
    """

    def module_init_tests_first(item):
        return int('test_xmlsec.py::TestModule::test_reinitialize_module' not in item.nodeid)

    items.sort(key=module_init_tests_first)