def pytest_addoption(parser):
    """Add the '--reorder' argument to the py.test invocation."""
    group = parser.getgroup('tests reordering', 'reordering', after='general')
    group.addoption('--reorder', type=str, nargs='*', help=
        """A list of regular expressions matching test nodeids and one '*' to specify the order of unmatched tests. The tests will be reordered according to these specs. If no arguments are passed, default ordering will be applied (unit tests, unmatched tests, integration tests, ui tests). 
E.g. `--reorder "(^|.*/)(test_)?unit" "*" "(^|.*/)(test_)?db" "(^|.*/)(test_)?web"`."""
        )
