MCPcopy Index your code
hub / github.com/python/cpython / test_whitespace

Method test_whitespace

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

Source from the content-addressed store, hash-verified

1234
1235
1236 def test_whitespace(self):
1237 value_pairs = [
1238 ('inf', INF),
1239 ('-Infinity', -INF),
1240 ('nan', NAN),
1241 ('1.0', 1.0),
1242 ('-0x.2', -0.125),
1243 ('-0.0', -0.0)
1244 ]
1245 whitespace = [
1246 '',
1247 ' ',
1248 '\t',
1249 '\n',
1250 '\n \t',
1251 '\f',
1252 '\v',
1253 '\r'
1254 ]
1255 for inp, expected in value_pairs:
1256 for lead in whitespace:
1257 for trail in whitespace:
1258 got = fromHex(lead + inp + trail)
1259 self.identical(got, expected)
1260
1261
1262 def test_from_hex(self):

Callers

nothing calls this directly

Calls 1

identicalMethod · 0.95

Tested by

no test coverage detected