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

Method test_whitespace

Lib/test/test_float.py:1241–1264  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1239
1240
1241 def test_whitespace(self):
1242 value_pairs = [
1243 ('inf', INF),
1244 ('-Infinity', -INF),
1245 ('nan', NAN),
1246 ('1.0', 1.0),
1247 ('-0x.2', -0.125),
1248 ('-0.0', -0.0)
1249 ]
1250 whitespace = [
1251 '',
1252 ' ',
1253 '\t',
1254 '\n',
1255 '\n \t',
1256 '\f',
1257 '\v',
1258 '\r'
1259 ]
1260 for inp, expected in value_pairs:
1261 for lead in whitespace:
1262 for trail in whitespace:
1263 got = fromHex(lead + inp + trail)
1264 self.identical(got, expected)
1265
1266
1267 @unittest.expectedFailure # TODO: RUSTPYTHON; ValueError: invalid hexadecimal floating-point string

Callers

nothing calls this directly

Calls 1

identicalMethod · 0.95

Tested by

no test coverage detected