Ejemplo n.º 1
0
def _get_testspecs_for_modules():
    modules = []
    for m in TESTED_MODULES.keys():
        try:
            modules.append(spec_for(m))
        except ModuleNotFoundError:
            # for optional modules it is okay to skip
            pass
    return modules
Ejemplo n.º 2
0
def test_module_missing_testspec():
    with pytest.raises(ValueError, match="TestSpec"):
        spec_for('cirq.testing.test_data.test_module_missing_testspec')
Ejemplo n.º 3
0
def test_missing_module():
    with pytest.raises(ModuleNotFoundError):
        spec_for('non_existent')
Ejemplo n.º 4
0
def test_module_missing_json_test_data():
    with pytest.raises(ValueError, match="json_test_data"):
        spec_for('cirq.testing.test_data.test_module_missing_json_test_data')