Exemple #1
0
def _check_requirements(base_dir, expected_modules):
    from setup import get_requirements
    actual_modules = set(
        get_requirements(os.path.join(base_dir, 'requirements.txt')))
    expected_modules = set(expected_modules)
    missed_modules = expected_modules.difference(actual_modules)
    extra_modules = actual_modules.difference(expected_modules)
    assert missed_modules == set() and extra_modules == set(
    ), f'missing {missed_modules}, extra {extra_modules}'
def _check_requirements(base_dir, expected_modules):
    from setup import get_requirements
    actual_modules = set(
        get_requirements(os.path.join(base_dir, 'requirements.txt')))

    assert actual_modules == expected_modules