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