Example #1
0
 def test_check_leading(self):
     test_strs = [
         ('1.05', '1.05'),
         ('.104', '104'),
         ('~104', '~104'),
         ('~.4', '~.4'),
         ('!444', '444')
     ]
     for test, expect in test_strs:
         test_list = list(test)
         rpm._check_leading(test_list)
         res = ''.join(test_list)
         self.assertEqual(expect, res)
Example #2
0
def test_check_leading(test, expect):
    """Check that stripping leading characters works as expected"""
    test_list = list(test)
    rpm._check_leading(test_list)
    res = ''.join(test_list)
    assert expect == res
Example #3
0
def test_check_leading(test, expect):
    """Check that stripping leading characters works as expected"""
    test_list = list(test)
    rpm._check_leading(test_list)
    res = ''.join(test_list)
    assert expect == res