[meld/precommit: 8/11] test: Update for flake8 naming



commit 45f7c3bb917c384b5d6b3923fdad854afa093ebf
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sun Oct 6 07:20:50 2019 +1000

    test: Update for flake8 naming

 test/test_matchers.py | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/test/test_matchers.py b/test/test_matchers.py
index 086b600e..8e33deff 100644
--- a/test/test_matchers.py
+++ b/test/test_matchers.py
@@ -6,7 +6,7 @@ from meld.matchers import myers
 
 class MatchersTests(unittest.TestCase):
 
-    def testBasicMatcher(self):
+    def test_basic_matcher(self):
         a = list('abcbdefgabcdefg')
         b = list('gfabcdefcd')
         r = [(0, 2, 3), (4, 5, 3), (10, 8, 2), (15, 10, 0)]
@@ -14,7 +14,7 @@ class MatchersTests(unittest.TestCase):
         blocks = matcher.get_matching_blocks()
         self.assertEqual(blocks, r)
 
-    def testPostprocessingCleanup(self):
+    def test_postprocessing_cleanup(self):
         a = list('abcfabgcd')
         b = list('afabcgabgcabcd')
         r = [(0, 2, 3), (4, 6, 3), (7, 12, 2), (9, 14, 0)]
@@ -22,7 +22,7 @@ class MatchersTests(unittest.TestCase):
         blocks = matcher.get_matching_blocks()
         self.assertEqual(blocks, r)
 
-    def testInlineMatcher(self):
+    def test_inline_matcher(self):
         a = 'red, blue, yellow, white'
         b = 'black green, hue, white'
         r = [(17, 16, 7), (24, 23, 0)]
@@ -30,7 +30,7 @@ class MatchersTests(unittest.TestCase):
         blocks = matcher.get_matching_blocks()
         self.assertEqual(blocks, r)
 
-    def testSyncPointMatcher0(self):
+    def test_sync_point_matcher0(self):
         a = list('012a3456c789')
         b = list('0a3412b5678')
         r = [(0, 0, 1), (3, 1, 3), (6, 7, 2), (9, 9, 2), (12, 11, 0)]
@@ -38,7 +38,7 @@ class MatchersTests(unittest.TestCase):
         blocks = matcher.get_matching_blocks()
         self.assertEqual(blocks, r)
 
-    def testSyncPointMatcher1(self):
+    def test_sync_point_matcher2(self):
         a = list('012a3456c789')
         b = list('0a3412b5678')
         r = [(0, 0, 1), (1, 4, 2), (6, 7, 2), (9, 9, 2), (12, 11, 0)]
@@ -46,7 +46,7 @@ class MatchersTests(unittest.TestCase):
         blocks = matcher.get_matching_blocks()
         self.assertEqual(blocks, r)
 
-    def testSyncPointMatcher2(self):
+    def test_sync_point_matcher3(self):
         a = list('012a3456c789')
         b = list('02a341b5678')
         r = [(0, 0, 1), (2, 1, 1), (3, 2, 3), (9, 9, 2), (12, 11, 0)]
@@ -54,6 +54,3 @@ class MatchersTests(unittest.TestCase):
             None, a, b, [(3, 2), (8, 6)])
         blocks = matcher.get_matching_blocks()
         self.assertEqual(blocks, r)
-
-if __name__ == '__main__':
-    unittest.main()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]