Skip to content

Commit eec74e0

Browse files
committed
Move test constants to a single location
1 parent b80fea6 commit eec74e0

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

qrcode/tests/consts.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
UNICODE_TEXT = "\u03b1\u03b2\u03b3"
2+
WHITE = (255, 255, 255)
3+
BLACK = (0, 0, 0)
4+
RED = (255, 0, 0)

qrcode/tests/test_qrcode.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,9 @@
1515
from qrcode.image.pure import PyPNGImage
1616
from qrcode.image.styledpil import StyledPilImage
1717
from qrcode.image.styles import colormasks, moduledrawers
18+
from qrcode.tests.consts import UNICODE_TEXT, WHITE, BLACK, RED
1819
from qrcode.util import MODE_8BIT_BYTE, MODE_ALPHA_NUM, MODE_NUMBER, QRData
1920

20-
UNICODE_TEXT = "\u03b1\u03b2\u03b3"
21-
WHITE = (255, 255, 255)
22-
BLACK = (0, 0, 0)
23-
RED = (255, 0, 0)
24-
2521

2622
class QRCodeTests(unittest.TestCase):
2723
def setUp(self):

qrcode/tests/test_qrcode_svg.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55

66
import qrcode
77
from qrcode.image import svg
8-
9-
UNICODE_TEXT = "\u03b1\u03b2\u03b3"
8+
from qrcode.tests.consts import UNICODE_TEXT
109

1110

1211
class SvgImageWhite(svg.SvgImage):

0 commit comments

Comments
 (0)