aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/test_GitRepository.py
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2013-03-08 11:48:23 +0200
committerGuido Günther <agx@sigxcpu.org>2013-03-22 21:03:31 +0100
commit3d80b2f671db3e4420bf308b290eddd634d1d437 (patch)
tree259626dd443bbee1430a9b469086634e953c783e /tests/test_GitRepository.py
parentdcf746752a942e6300b1534c8119c2da84b26d8f (diff)
GitRepository/_cmd_has_feature: more intelligent parsing
More intelligent parsing of the git output (man page). Try to parse optional options like '--[no-]standard-notes' of git-show correctly. In this example both 'no-standard-notes' and 'standard-notes' would be available. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'tests/test_GitRepository.py')
-rw-r--r--tests/test_GitRepository.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_GitRepository.py b/tests/test_GitRepository.py
index 0e833b50..5029630f 100644
--- a/tests/test_GitRepository.py
+++ b/tests/test_GitRepository.py
@@ -803,6 +803,10 @@ def test_cmd_has_feature():
Traceback (most recent call last):
...
GitRepositoryError: Invalid git command: foobarcmd
+ >>> repo._cmd_has_feature("show", "standard-notes")
+ True
+ >>> repo._cmd_has_feature("show", "no-standard-notes")
+ True
"""
def test_teardown():