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

Method test_bad_input_order

Lib/test/test_tokenize.py:1939–1949  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1937class UntokenizeTest(TestCase):
1938
1939 def test_bad_input_order(self):
1940 # raise if previous row
1941 u = tokenize.Untokenizer()
1942 u.prev_row = 2
1943 u.prev_col = 2
1944 with self.assertRaises(ValueError) as cm:
1945 u.add_whitespace((1,3))
1946 self.assertEqual(cm.exception.args[0],
1947 'start (1,3) precedes previous end (2,2)')
1948 # raise if previous column in row
1949 self.assertRaises(ValueError, u.add_whitespace, (2,1))
1950
1951 def test_backslash_continuation(self):
1952 # The problem is that <whitespace>\<newline> leaves no token

Callers

nothing calls this directly

Calls 3

add_whitespaceMethod · 0.95
assertRaisesMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected