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

Method test_comments

Lib/test/test_re.py:1978–1989  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1976 self.assertTrue(re.fullmatch('(?x) a| b', 'b'))
1977
1978 def test_comments(self):
1979 self.assertTrue(re.fullmatch('#x\na', 'a', re.VERBOSE))
1980 self.assertTrue(re.fullmatch(b'#x\na', b'a', re.VERBOSE))
1981 self.assertTrue(re.fullmatch('(?x)#x\na', 'a'))
1982 self.assertTrue(re.fullmatch('#x\n(?x)#y\na', 'a', re.VERBOSE))
1983 self.assertTrue(re.fullmatch('(?x)#x\n(?x)#y\na', 'a'))
1984 self.assertTrue(re.fullmatch('#x\na(?x:#y\nb)#z\nc', '#x\nab#z\nc'))
1985 self.assertTrue(re.fullmatch('#x\na(?-x:#y\nb)#z\nc', 'a#y\nbc',
1986 re.VERBOSE))
1987 self.assertTrue(re.fullmatch('(?x)#x\na(?-x:#y\nb)#z\nc', 'a#y\nbc'))
1988 self.assertTrue(re.fullmatch('(?x)#x\na|#y\nb', 'a'))
1989 self.assertTrue(re.fullmatch('(?x)#x\na|#y\nb', 'b'))
1990
1991 def test_bug_6509(self):
1992 # Replacement strings of both types must parse properly.

Callers

nothing calls this directly

Calls 2

assertTrueMethod · 0.80
fullmatchMethod · 0.80

Tested by

no test coverage detected