def test_parse(self): item = MethodItem.parse( ['method(arguments)', ' Definition in a single line']) self.assertEqual(item, MethodItem( 'method', ['arguments'], ['Definition in a single line']))
def test_is_item(self): self.assertTrue(MethodItem.is_item("term()")) self.assertTrue( MethodItem.is_item("term(*args, my_keyword=None)")) self.assertFalse(MethodItem.is_item("term")) self.assertFalse(MethodItem.is_item("term : *args"))