Skip to content

Commit dd13348

Browse files
committed
move util func out of test
1 parent 4133aa8 commit dd13348

1 file changed

Lines changed: 11 additions & 12 deletions

File tree

test_fonts.py

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,17 @@
5050

5151
rootdir = path.dirname(__file__)
5252

53+
def teststrgen():
54+
s = ""
55+
for i in range(256):
56+
if i != 9 and i != 13 and i != 10:
57+
s += chr(i)
58+
else:
59+
s += " "
60+
if (i + 1) % 16 == 0:
61+
s += "\n"
62+
return s
63+
5364

5465
class TestFontfilefunc(unittest.TestCase):
5566

@@ -58,18 +69,6 @@ class TestFontfilefunc(unittest.TestCase):
5869
outputdir = f'{rootdir}/test_output/'
5970
c = getX11colorname2RGBdict()
6071
c1 = getcolorname2RGBdict()
61-
62-
def teststrgen():
63-
s = ""
64-
for i in range(256):
65-
if i != 9 and i != 13 and i != 10:
66-
s += chr(i)
67-
else:
68-
s += " "
69-
if (i + 1) % 16 == 0:
70-
s += "\n"
71-
return s
72-
7372
teststr = teststrgen()
7473
rainbow = (c1['brightred'],
7574
c1['brightorange'],

0 commit comments

Comments
 (0)