Example #1
0
 def test_decimal_reload(self):
     # Simulate a subinterpreter that reloads the Python modules but not
     # the C code https://github.com/simplejson/simplejson/issues/34
     global Decimal
     Decimal = reload_module(decimal).Decimal
     import simplejson.encoder
     simplejson.encoder.Decimal = Decimal
     self.test_decimal_roundtrip()
Example #2
0
 def test_datetime_reload(self):
     # Simulate a subinterpreter that reloads the Python modules but not
     # the C code https://github.com/simplejson/simplejson/issues/34
     global datetime_module
     datetime = reload_module(datetime_module).datetime
     import simplejson.encoder
     simplejson.encoder.datetime = datetime
     self.test_datetime_roundtrip()