def test_invalid_refspec_dict(self): with self.assertRaises(AssertionError): DtypeSpec.assertValidDtype({ 'no target': 'test', # <-- missing or here bad target key for RefSpec 'reftype': 'object' })
def test_invalid_refspec_dict(self): """Test missing or bad target key for RefSpec.""" msg = "'dtype' must have the key 'target_type'" with self.assertRaisesWith(ValueError, msg): DtypeSpec.assertValidDtype({ 'no target': 'test', 'reftype': 'object' })