def test_comment():
 pattern = 'a(?#foo)bc'
 c = re.compile(pattern)
 AreEqual(c.findall('abc'), ['abc'])
 pattern = 'a(?#)bc'
 c = re.compile(pattern)
 AreEqual(c.findall('abc'), ['abc'])
 pattern = 'a(?#foo)bdc'
 c = re.compile(pattern)
 AreEqual(len(c.findall('abc')), 0)

def test_comment ( ) : pattern = 'a(?#foo)bc' c = re . compile ( pattern ) AreEqual ( c . findall ( 'abc' ) , [ 'abc' ] ) pattern = 'a(?#)bc' c = re . compile ( pattern ) AreEqual ( c . findall ( 'abc' ) , [ 'abc' ] ) pattern = 'a(?#foo)bdc' c = re . compile ( pattern ) AreEqual ( len ( c . findall ( 'abc' ) ) , 0 )
make sure that line comments are ignored by the c reader .