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

Method test_nul

Lib/test/test_format.py:553–558  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

551 raise TestFailed('"%*d"%(maxsize, -127) should fail')
552
553 def test_nul(self):
554 # test the null character
555 testcommon("a\0b", (), 'a\0b')
556 testcommon("a%cb", (0,), 'a\0b')
557 testformat("a%sb", ('c\0d',), 'ac\0db')
558 testcommon(b"a%sb", (b'c\0d',), b'ac\0db')
559
560 def test_non_ascii(self):
561 testformat("\u20ac=%f", (1.0,), "\u20ac=1.000000")

Callers

nothing calls this directly

Calls 2

testcommonFunction · 0.85
testformatFunction · 0.85

Tested by

no test coverage detected