subunit: Cope with lowercase test results in tap2subunit.
[ira/wip.git] / lib / subunit / python / subunit / tests / test_tap2subunit.py
index febfe9d441336be3f8f396c5cbb6960ef87717e0..c4ca4cdb3af3f4e4c1320dc3403e0a3adebe6329 100644 (file)
@@ -18,9 +18,7 @@
 
 import unittest
 from StringIO import StringIO
-import os
 import subunit
-import sys
 
 
 class TestTAP2SubUnit(unittest.TestCase):
@@ -125,6 +123,19 @@ class TestTAP2SubUnit(unittest.TestCase):
             ],
             self.subunit.getvalue().splitlines())
 
+    def test_ok_skip_number_comment_lowercase(self):
+        self.tap.write("ok 1 # skip no samba environment available, skipping compilation\n")
+        self.tap.seek(0)
+        result = subunit.TAP2SubUnit(self.tap, self.subunit)
+        self.assertEqual(0, result)
+        self.assertEqual([
+            "test test 1",
+            "skip test 1 [", 
+            "no samba environment available, skipping compilation",
+            "]"
+            ],
+            self.subunit.getvalue().splitlines())
+
     def test_ok_number_description_SKIP_skip_comment(self):
         # A file
         # ok 1 foo  # SKIP Not done yet