def test__pickle(): """ TODO: just a sanity test for now. Needs far more testing. """ regex = re.compile(r"^(?P<msg>NMAKE[A-Za-z0-9]*)'\"?(?P<file>[\\A-Za-z0-9/:_\.\+]+)") pickled_regex = re._pickle(regex) AreEqual(len(pickled_regex), 2) AreEqual(pickled_regex[1], ("^(?P<msg>NMAKE[A-Za-z0-9]*)'\\\"?(?P<file>[\\\\A-Za-z0-9/:_\\.\\+]+)", 0))
def test__pickle(self): ''' TODO: just a sanity test for now. Needs far more testing. ''' regex = re.compile(r"^(?P<msg>NMAKE[A-Za-z0-9]*)'\"?(?P<file>[\\A-Za-z0-9/:_\.\+]+)" ) pickled_regex = re._pickle(regex) self.assertEqual(len(pickled_regex), 2) self.assertEqual(pickled_regex[1], ('^(?P<msg>NMAKE[A-Za-z0-9]*)\'\\"?(?P<file>[\\\\A-Za-z0-9/:_\\.\\+]+)', 0))
def update_event(self, inp=-1): self.set_output_val(0, re._pickle(self.input(0)))