Skip to content

Commit 6117068

Browse files
committed
More readable configparser name
1 parent 7c7e699 commit 6117068

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/test_printer.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ def setUp(self):
2121

2222
directory = os.path.dirname(os.path.realpath(__file__))
2323
testfile = os.path.join(directory, "test.ini")
24-
self.cp = ConfigParser()
25-
self.cp.read(testfile)
24+
self.cparser = ConfigParser()
25+
self.cparser.read(testfile)
2626

2727
def test_PrinterFactory_InlinePrinter(self):
2828
"""
@@ -59,7 +59,7 @@ def test_InlinePrinter(self):
5959

6060
#TODO Make this more readable
6161
expected_output = "test cheat a lorem\ntest cheat b ipsum\ntest cheat c dolor\n"
62-
printer = cp.InlinePrinter(self.cp)
62+
printer = cp.InlinePrinter(self.cparser)
6363

6464
with patch('sys.stdout', new=StringIO()) as fake_out:
6565
printer.printsheet()
@@ -70,7 +70,7 @@ def test_InlinePrinter_width(self):
7070
Test to see if the calculated width is correct.
7171
"""
7272

73-
printer = cp.InlinePrinter(self.cp)
73+
printer = cp.InlinePrinter(self.cparser)
7474

7575
expected_length = str(len('Test Cheat A'))
7676
self.assertEqual(printer.width, expected_length)
@@ -82,7 +82,7 @@ def test_BreaklinePrinter(self):
8282

8383
#TODO Make this more readable
8484
expected_output = "test cheat a \n lorem\ntest cheat b \n ipsum\ntest cheat c \n dolor\n"
85-
printer = cp.BreaklinePrinter(self.cp)
85+
printer = cp.BreaklinePrinter(self.cparser)
8686

8787
with patch('sys.stdout', new=StringIO()) as fake_out:
8888
printer.printsheet()
@@ -96,7 +96,7 @@ def test_Printer_printsheet(self):
9696

9797
#TODO Make this more readable
9898
expected_output = "test cheat a\ntest cheat b\ntest cheat c\n"
99-
printer = cp.Printer(self.cp)
99+
printer = cp.Printer(self.cparser)
100100
template = "{0}"
101101

102102
with patch('sys.stdout', new=StringIO()) as fake_out:

0 commit comments

Comments
 (0)