MCPcopy Index your code
hub / github.com/RustPython/RustPython / D

Class D

Lib/test/test_decimal.py:2001–2002  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1999 def __hash__(self):
2000 return 42
2001 class D(Decimal, H):
2002 pass
2003 value = D('NaN')
2004 self.assertEqual(hash(value), object.__hash__(value))
2005

Callers 13

innerFunction · 0.90
int_to_decimalFunction · 0.90
_dec_str_to_int_innerFunction · 0.90
test_integersMethod · 0.90
test_binary_floatsMethod · 0.90
test_decimalsMethod · 0.90
test_complexMethod · 0.90
testDistMethod · 0.90
test_parse_floatMethod · 0.90
test_hash_method_nanMethod · 0.70

Calls

no outgoing calls

Tested by 10

test_integersMethod · 0.72
test_binary_floatsMethod · 0.72
test_decimalsMethod · 0.72
test_complexMethod · 0.72
testDistMethod · 0.72
test_parse_floatMethod · 0.72
test_hash_method_nanMethod · 0.56
test_named_parametersMethod · 0.56