rename fixPrint->_fix_print and add a docstring

This commit is contained in:
Mike McLean 2017-12-05 20:54:23 -05:00 committed by Yuming Zhu
parent 1da06800cf
commit 8a4c75ee7f
3 changed files with 16 additions and 11 deletions

View file

@ -46,15 +46,15 @@ class FixEncodingTestCase(unittest.TestCase):
self.assertEqual(koji.fixEncoding(d, remove_nonprintable=True), b)
@mock.patch('sys.stdout', new_callable=six.StringIO)
def test_fixPrint(self, stdout):
"""Test the fixPrint function"""
def test_fix_print(self, stdout):
"""Test the _fix_print function"""
expected = ''
for a, b in self.simple_values:
if six.PY3:
self.assertEqual(koji.fixPrint(b), a)
self.assertEqual(koji._fix_print(b), a)
else:
self.assertEqual(koji.fixPrint(b), b)
print(koji.fixPrint(b))
self.assertEqual(koji._fix_print(b), b)
print(koji._fix_print(b))
if six.PY3:
expected = expected + a + '\n'
else: