def test_notAhead(self): regex = RegExpBuilder() regex.exactly(1).of("dart") regex.notAhead(RegExpBuilder().exactly(1).of("pqr")) regex = regex.getRegExp() self.assertTrue(regex.match("dartlang") is not None) self.assertTrue(regex.match("dartpqr") is None)