示例#1
0
 def _parse_feature(self, info):
     """Parse a feature command."""
     parts = info.split(b'=', 1)
     name = parts[0]
     if len(parts) > 1:
         value = self._path(parts[1])
     else:
         value = None
     self.features[name] = value
     return commands.FeatureCommand(name, value, lineno=self.lineno)
示例#2
0
 def test_feature_with_value(self):
     c = commands.FeatureCommand(b"dwim", b"please")
     self.assertEqual(b"feature dwim=please", bytes(c))
示例#3
0
 def test_feature(self):
     c = commands.FeatureCommand(b"dwim")
     self.assertEqual(b"feature dwim", bytes(c))