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

Method test_bad_input_order

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

Source from the content-addressed store, hash-verified

1939class UntokenizeTest(TestCase):
1940
1941 def test_bad_input_order(self):
1942 # raise if previous row
1943 u = tokenize.Untokenizer()
1944 u.prev_row = 2
1945 u.prev_col = 2
1946 with self.assertRaises(ValueError) as cm:
1947 u.add_whitespace((1,3))
1948 self.assertEqual(cm.exception.args[0],
1949 'start (1,3) precedes previous end (2,2)')
1950 # raise if previous column in row
1951 self.assertRaises(ValueError, u.add_whitespace, (2,1))
1952
1953 def test_backslash_continuation(self):
1954 # 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