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
def test_module_missing_testspec(): with pytest.raises(ValueError, match="TestSpec"): spec_for('cirq.testing.test_data.test_module_missing_testspec')
def test_missing_module(): with pytest.raises(ModuleNotFoundError): spec_for('non_existent')
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')