def pytest_addoption(parser):
    group = parser.getgroup('general')
    group.addoption('--lf', '--last-failed', action='store_true', dest='lf', help='rerun only the tests that failed at the last run (or all if none failed)')
    group.addoption('--ff', '--failed-first', action='store_true', dest='failedfirst', help='run all tests but run the last failures first.  This may re-order tests and thus lead to repeated fixture setup/teardown')
    group.addoption('--nf', '--new-first', action='store_true', dest='newfirst', help='run tests from new files first, then the rest of the tests sorted by file mtime')
    group.addoption('--cache-show', action='store_true', dest='cacheshow', help="show cache contents, don't perform collection or tests")
    group.addoption('--cache-clear', action='store_true', dest='cacheclear', help='remove all cache contents at start of test run.')
    parser.addini('cache_dir', default='.pytest_cache', help='cache directory path.')
    group.addoption('--lfnf', '--last-failed-no-failures', action='store', dest='last_failed_no_failures', choices=('all', 'none'), default='all', help='change the behavior when no test failed in the last run or no information about the last failures was found in the cache')
def pytest_addoption(parser):
    group = parser.getgroup('general')
    group.addoption('--lf', '--last-failed', action='store_true', dest='lf', help='rerun only the tests that failed at the last run (or all if none failed)')
    group.addoption('--ff', '--failed-first', action='store_true', dest='failedfirst', help='run all tests but run the last failures first.  This may re-order tests and thus lead to repeated fixture setup/teardown')
    group.addoption('--nf', '--new-first', action='store_true', dest='newfirst', help='run tests from new files first, then the rest of the tests sorted by file mtime')
    group.addoption('--cache-show', action='store_true', dest='cacheshow', help="show cache contents, don't perform collection or tests")
    group.addoption('--cache-clear', action='store_true', dest='cacheclear', help='remove all cache contents at start of test run.')
    parser.addini('cache_dir', default='.pytest_cache', help='cache directory path.')
    group.addoption('--lfnf', '--last-failed-no-failures', action='store', dest='last_failed_no_failures', choices=('all', 'none'), default='all', help='change the behavior when no test failed in the last run or no information about the last failures was found in the cache')