Exemplo n.º 1
0
 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'
         })
Exemplo n.º 2
0
 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'
         })