[utils] lookup_unit_table: Match word boundary instead of end of string
[youtube-dl] / test / test_utils.py
index 9a3a8ddfff1363fe12eb19fe9cb1045fa0fcdda8..325b870ccc77014ca20b8e945f4d6a710a01513f 100644 (file)
@@ -702,6 +702,8 @@ class TestUtil(unittest.TestCase):
         self.assertEqual(parse_count('1.000'), 1000)
         self.assertEqual(parse_count('1.1k'), 1100)
         self.assertEqual(parse_count('1.1kk'), 1100000)
+        self.assertEqual(parse_count('1.1kk '), 1100000)
+        self.assertEqual(parse_count('1.1kk views'), 1100000)
 
     def test_version_tuple(self):
         self.assertEqual(version_tuple('1'), (1,))