Ejemplo n.º 1
0
 def test_pop_digits(self):
     test_strs = [
         ('1.05', '1'),
         ('12.44', '12'),
         ('12a4.2', '12'),
         ('aa4', ''),
         ('.1234', '')
     ]
     for test, expect in test_strs:
         test_list = list(test)
         digits = rpm._pop_digits(test_list)
         res = ''.join(digits)
         self.assertEqual(expect, res)
Ejemplo n.º 2
0
def test_pop_digits(test, expect):
    """Test that digit blocks are properly popped from strings"""
    test_list = list(test)
    digits = rpm._pop_digits(test_list)
    res = ''.join(digits)
    assert expect == res
Ejemplo n.º 3
0
def test_pop_digits(test, expect):
    """Test that digit blocks are properly popped from strings"""
    test_list = list(test)
    digits = rpm._pop_digits(test_list)
    res = ''.join(digits)
    assert expect == res