Exemplo n.º 1
0
 def test_parse_item(self):
     data = 'one two three four: 845 six'
     cp = CommandParser()
     cp.ITEM_REGEXS = [r'four:\ (?P<num>\w+)']
     rec = cp.parse_item(data)
     self.assertEquals(rec['num'], '845')
Exemplo n.º 2
0
    def test_parse_item(self):
        data = 'one two three four: 845 six'
	cp = CommandParser()
	cp.ITEM_REGEXS = [r'four:\ (?P<num>\w+)']
	rec = cp.parse_item(data)
	self.assertEquals(rec['num'], '845')