def test_pos(self): # basic search() test r = parse.search('a {} c', ' a b c ', 2) self.assertEqual(r, None)
def test_multiline(self): # multiline search() test r = parse.search('age: {:d}\n', 'name: Rufus\nage: 42\ncolor: red\n') self.assertEqual(r.fixed, (42,))
def test_basic(self): # basic search() test r = parse.search('a {} c', ' a b c ') self.assertEqual(r.fixed, ('b',))
def test_multiline(self): # multiline search() test r = parse.search('age: {:d}\n', 'name: Rufus\nage: 42\ncolor: red\n') self.assertEqual(r.fixed, (42, ))
def test_basic(self): # basic search() test r = parse.search('a {} c', ' a b c ') self.assertEqual(r.fixed, ('b', ))