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

Method test_c_complex_round_trip

Lib/test/test_struct.py:806–813  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

804
805 @unittest.expectedFailure # TODO: RUSTPYTHON
806 def test_c_complex_round_trip(self):
807 values = [complex(*_) for _ in combinations([1, -1, 0.0, -0.0, 2,
808 -3, INF, -INF, NAN], 2)]
809 for z in values:
810 for f in ['F', 'D', '>F', '>D', '<F', '<D']:
811 with self.subTest(z=z, format=f):
812 round_trip = struct.unpack(f, struct.pack(f, z))[0]
813 self.assertComplexesAreIdentical(z, round_trip)
814
815 @unittest.skipIf(
816 support.is_android or support.is_apple_mobile,

Callers

nothing calls this directly

Calls 4

subTestMethod · 0.80
unpackMethod · 0.45
packMethod · 0.45

Tested by

no test coverage detected