def check_bad(self, fromty, toty):
     with self.assertRaises(TypingError) as raises:
         dictobject._sentry_safe_cast(fromty, toty)
     self.assertIn(
         'cannot safely cast {fromty} to {toty}'.format(**locals()),
         str(raises.exception),
     )
Beispiel #2
0
 def check_bad(self, fromty, toty):
     with self.assertRaises(TypingError) as raises:
         dictobject._sentry_safe_cast(fromty, toty)
     self.assertIn(
         'cannot safely cast {fromty} to {toty}'.format(**locals()),
         str(raises.exception),
     )
 def check_good(self, fromty, toty):
     dictobject._sentry_safe_cast(fromty, toty)
Beispiel #4
0
 def check_good(self, fromty, toty):
     dictobject._sentry_safe_cast(fromty, toty)