Skip to content

Commit 8dfa77c

Browse files
committed
update tests for change to bright cyan for glyph names in some subcmd
1 parent f52a84e commit 8dfa77c

File tree

4 files changed

+44
-48
lines changed

4 files changed

+44
-48
lines changed

tests/test_contours.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def mock_isatty():
9090
captured = capsys.readouterr()
9191
# must be in a tty to get ANSI color output
9292
# this is mocked above
93-
assert "[ \x1b[1;36mA\x1b[0m ]: 2" in captured.out
93+
assert "[ \x1b[1;96mA\x1b[0m ]: 2" in captured.out
9494

9595

9696
def test_contours_run_single_glyph_noncomposite_nocolor(capsys, monkeypatch):
@@ -122,7 +122,7 @@ def mock_isatty():
122122
captured = capsys.readouterr()
123123
# must be in a tty to get ANSI color output
124124
# this is mocked above
125-
assert "[ \x1b[1;36muni2E2E\x1b[0m ]: 2" in captured.out
125+
assert "[ \x1b[1;96muni2E2E\x1b[0m ]: 2" in captured.out
126126

127127

128128
def test_contours_run_single_glyph_composite_nocolor(capsys, monkeypatch):
@@ -154,12 +154,12 @@ def mock_isatty():
154154
captured = capsys.readouterr()
155155
# must be in a tty to get ANSI color output
156156
# this is mocked above
157-
assert "[ \x1b[1;36m.notdef\x1b[0m ]: 0" in captured.out
158-
assert "[ \x1b[1;36mspace\x1b[0m ]: 0" in captured.out
159-
assert "[ \x1b[1;36mcomma\x1b[0m ]: 1" in captured.out
160-
assert "[ \x1b[1;36mquestion\x1b[0m ]: 2" in captured.out
161-
assert "[ \x1b[1;36mA\x1b[0m ]: 2" in captured.out
162-
assert "[ \x1b[1;36muni2E2E\x1b[0m ]: 2" in captured.out
157+
assert "[ \x1b[1;96m.notdef\x1b[0m ]: 0" in captured.out
158+
assert "[ \x1b[1;96mspace\x1b[0m ]: 0" in captured.out
159+
assert "[ \x1b[1;96mcomma\x1b[0m ]: 1" in captured.out
160+
assert "[ \x1b[1;96mquestion\x1b[0m ]: 2" in captured.out
161+
assert "[ \x1b[1;96mA\x1b[0m ]: 2" in captured.out
162+
assert "[ \x1b[1;96muni2E2E\x1b[0m ]: 2" in captured.out
163163

164164

165165
def test_contours_run_multi_glyph_composite_nocolor(capsys, monkeypatch):

tests/test_coordinates.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def mock_isatty():
7575
captured = capsys.readouterr()
7676
# must be in a tty to get ANSI color output
7777
# this is mocked above
78-
assert "\x1b[1;36m'A' coordinates\x1b[0m" in captured.out
78+
assert "\x1b[1;96m'A' coordinates\x1b[0m" in captured.out
7979
# check first contour start coordinate appropriately labeled
8080
assert f"(545, 0) {COLORED_START}" in captured.out
8181
assert f"(459, 221) {ON_PATH}" in captured.out
@@ -103,7 +103,7 @@ def mock_isatty():
103103
captured = capsys.readouterr()
104104
# must be in a tty to get ANSI color output
105105
# this is mocked above
106-
assert "\x1b[1;36m'A' coordinates\x1b[0m" not in captured.out
106+
assert "\x1b[1;96m'A' coordinates\x1b[0m" not in captured.out
107107
assert "'A' coordinates" in captured.out
108108
# check first contour start coordinate appropriately labeled
109109
assert f"(545, 0) {COLORED_START}" not in captured.out
@@ -141,7 +141,7 @@ def mock_isatty():
141141
captured = capsys.readouterr()
142142
# must be in a tty to get ANSI color output
143143
# this is mocked above
144-
assert "\x1b[1;36m'uni2E2E' coordinates\x1b[0m" in captured.out
144+
assert "\x1b[1;96m'uni2E2E' coordinates\x1b[0m" in captured.out
145145

146146
assert f"(303, 201) {COLORED_START}" in captured.out
147147
assert f"(303, 228) {ON_PATH}" in captured.out
@@ -174,7 +174,7 @@ def mock_isatty():
174174
captured = capsys.readouterr()
175175
# must be in a tty to get ANSI color output
176176
# this is mocked above
177-
assert "\x1b[1;36m'uni2E2E' coordinates\x1b[0m" not in captured.out
177+
assert "\x1b[1;96m'uni2E2E' coordinates\x1b[0m" not in captured.out
178178
assert "'uni2E2E' coordinates" in captured.out
179179

180180
assert f"(303, 201) {UNCOLORED_START}" in captured.out
@@ -208,12 +208,12 @@ def mock_isatty():
208208
captured = capsys.readouterr()
209209

210210
# confirm all expected glyphs are included
211-
assert "\x1b[1;36m'.notdef' coordinates\x1b[0m" in captured.out
212-
assert "\x1b[1;36m'space' coordinates\x1b[0m" in captured.out
213-
assert "\x1b[1;36m'comma' coordinates\x1b[0m" in captured.out
214-
assert "\x1b[1;36m'question' coordinates\x1b[0m" in captured.out
215-
assert "\x1b[1;36m'A' coordinates\x1b[0m" in captured.out
216-
assert "\x1b[1;36m'uni2E2E' coordinates\x1b[0m" in captured.out
211+
assert "\x1b[1;96m'.notdef' coordinates\x1b[0m" in captured.out
212+
assert "\x1b[1;96m'space' coordinates\x1b[0m" in captured.out
213+
assert "\x1b[1;96m'comma' coordinates\x1b[0m" in captured.out
214+
assert "\x1b[1;96m'question' coordinates\x1b[0m" in captured.out
215+
assert "\x1b[1;96m'A' coordinates\x1b[0m" in captured.out
216+
assert "\x1b[1;96m'uni2E2E' coordinates\x1b[0m" in captured.out
217217

218218
# check start paths across the glyphs
219219
assert f"(185, 116) {COLORED_START}" in captured.out
@@ -276,12 +276,12 @@ def mock_isatty():
276276
captured = capsys.readouterr()
277277

278278
# confirm all expected glyphs are included
279-
assert "\x1b[1;36m'.notdef' coordinates\x1b[0m" not in captured.out
280-
assert "\x1b[1;36m'space' coordinates\x1b[0m" not in captured.out
281-
assert "\x1b[1;36m'comma' coordinates\x1b[0m" not in captured.out
282-
assert "\x1b[1;36m'question' coordinates\x1b[0m" not in captured.out
283-
assert "\x1b[1;36m'A' coordinates\x1b[0m" not in captured.out
284-
assert "\x1b[1;36m'uni2E2E' coordinates\x1b[0m" not in captured.out
279+
assert "\x1b[1;96m'.notdef' coordinates\x1b[0m" not in captured.out
280+
assert "\x1b[1;96m'space' coordinates\x1b[0m" not in captured.out
281+
assert "\x1b[1;96m'comma' coordinates\x1b[0m" not in captured.out
282+
assert "\x1b[1;96m'question' coordinates\x1b[0m" not in captured.out
283+
assert "\x1b[1;96m'A' coordinates\x1b[0m" not in captured.out
284+
assert "\x1b[1;96m'uni2E2E' coordinates\x1b[0m" not in captured.out
285285

286286
assert "'.notdef' coordinates" in captured.out
287287
assert "'space' coordinates" in captured.out

tests/test_direction.py

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def mock_isatty():
7171
captured = capsys.readouterr()
7272
# must be in a tty to get ANSI color output
7373
# this is mocked above
74-
assert "[ \x1b[1;36m.notdef\x1b[0m ]: no contours" in captured.out
74+
assert "[ \x1b[1;96m.notdef\x1b[0m ]: no contours" in captured.out
7575

7676

7777
def test_direction_run_single_glyph_non_composite_no_contours_nocolor(
@@ -92,9 +92,7 @@ def mock_isatty():
9292
assert "[ .notdef ]: no contours" in captured.out
9393

9494

95-
def test_direction_run_single_glyph_non_composite_clockwise_default(
96-
capsys, monkeypatch
97-
):
95+
def test_direction_run_single_glyph_non_composite_clockwise_default(capsys, monkeypatch):
9896
def mock_isatty():
9997
return True
10098

@@ -107,12 +105,10 @@ def mock_isatty():
107105
captured = capsys.readouterr()
108106
# must be in a tty to get ANSI color output
109107
# this is mocked above
110-
assert "[ \x1b[1;36mA\x1b[0m ]: clockwise" in captured.out
108+
assert "[ \x1b[1;96mA\x1b[0m ]: clockwise" in captured.out
111109

112110

113-
def test_dierection_run_single_glyph_non_composite_clockwise_nocolor(
114-
capsys, monkeypatch
115-
):
111+
def test_dierection_run_single_glyph_non_composite_clockwise_nocolor(capsys, monkeypatch):
116112
def mock_isatty():
117113
return True
118114

@@ -143,7 +139,7 @@ def mock_isatty():
143139
captured = capsys.readouterr()
144140
# must be in a tty to get ANSI color output
145141
# this is mocked above
146-
assert "[ \x1b[1;36muni2E2E\x1b[0m ]: counter-clockwise" in captured.out
142+
assert "[ \x1b[1;96muni2E2E\x1b[0m ]: counter-clockwise" in captured.out
147143
assert "with component 'question' transform: [[-1.0, 0], [0, 1.0]]" in captured.out
148144

149145

@@ -181,12 +177,12 @@ def mock_isatty():
181177
direction_run(args)
182178

183179
captured = capsys.readouterr()
184-
assert "[ \x1b[1;36m.notdef\x1b[0m ]: no contours" in captured.out
185-
assert "[ \x1b[1;36mspace\x1b[0m ]: no contours" in captured.out
186-
assert "[ \x1b[1;36mcomma\x1b[0m ]: clockwise" in captured.out
187-
assert "[ \x1b[1;36mquestion\x1b[0m ]: clockwise" in captured.out
188-
assert "[ \x1b[1;36mA\x1b[0m ]: clockwise" in captured.out
189-
assert "[ \x1b[1;36muni2E2E\x1b[0m ]: counter-clockwise" in captured.out
180+
assert "[ \x1b[1;96m.notdef\x1b[0m ]: no contours" in captured.out
181+
assert "[ \x1b[1;96mspace\x1b[0m ]: no contours" in captured.out
182+
assert "[ \x1b[1;96mcomma\x1b[0m ]: clockwise" in captured.out
183+
assert "[ \x1b[1;96mquestion\x1b[0m ]: clockwise" in captured.out
184+
assert "[ \x1b[1;96mA\x1b[0m ]: clockwise" in captured.out
185+
assert "[ \x1b[1;96muni2E2E\x1b[0m ]: counter-clockwise" in captured.out
190186
assert (
191187
" with component 'question' transform: [[-1.0, 0], [0, 1.0]]"
192188
in captured.out

tests/test_path.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def mock_isatty():
6767
captured = capsys.readouterr()
6868
# must be in a tty to get ANSI color output
6969
# this is mocked above
70-
assert "\x1b[1;36m'A' path\x1b[0m" in captured.out
70+
assert "\x1b[1;96m'A' path\x1b[0m" in captured.out
7171
assert "path.moveTo(869, 377)" in captured.out
7272

7373

@@ -85,7 +85,7 @@ def mock_isatty():
8585
# must be in a tty to get ANSI color output
8686
# this is mocked above and ANSI color should be off
8787
# due to command line flag
88-
assert "\x1b[1;36m'A' path\x1b[0m" not in captured.out
88+
assert "\x1b[1;96m'A' path\x1b[0m" not in captured.out
8989
assert "'A' path" in captured.out
9090
assert "path.moveTo(869, 377)" in captured.out
9191

@@ -98,7 +98,7 @@ def test_path_run_single_glyph_non_composite_nocolor_when_not_tty(capsys):
9898
# must be in a tty to get ANSI color output
9999
# this is not mocked in this test and there should be no
100100
# color in non-tty test setting
101-
assert "\x1b[1;36m'A' path\x1b[0m" not in captured.out
101+
assert "\x1b[1;96m'A' path\x1b[0m" not in captured.out
102102
assert "'A' path" in captured.out
103103
assert "path.moveTo(869, 377)" in captured.out
104104

@@ -116,7 +116,7 @@ def mock_isatty():
116116
captured = capsys.readouterr()
117117
# must be in a tty to get ANSI color output
118118
# this is mocked above
119-
assert "\x1b[1;36m'Scedilla' path\x1b[0m" in captured.out
119+
assert "\x1b[1;96m'Scedilla' path\x1b[0m" in captured.out
120120
assert "path.quadTo(728, -66, 699, -61)" in captured.out
121121

122122

@@ -133,7 +133,7 @@ def mock_isatty():
133133
captured = capsys.readouterr()
134134
# must be in a tty to get ANSI color output
135135
# this is mocked above
136-
assert "\x1b[1;36m'Scedilla' path\x1b[0m" not in captured.out
136+
assert "\x1b[1;96m'Scedilla' path\x1b[0m" not in captured.out
137137
assert "'Scedilla' path" in captured.out
138138
assert "path.quadTo(728, -66, 699, -61)" in captured.out
139139

@@ -145,7 +145,7 @@ def test_path_run_single_glyph_composite_nocolor_when_not_tty(capsys):
145145
captured = capsys.readouterr()
146146
# must be in a tty to get ANSI color output
147147
# this is mocked above
148-
assert "\x1b[1;36m'Scedilla' path\x1b[0m" not in captured.out
148+
assert "\x1b[1;96m'Scedilla' path\x1b[0m" not in captured.out
149149
assert "'Scedilla' path" in captured.out
150150
assert "path.quadTo(728, -66, 699, -61)" in captured.out
151151

@@ -163,7 +163,7 @@ def mock_isatty():
163163
captured = capsys.readouterr()
164164
# must be in a tty to get ANSI color output
165165
# this is mocked above
166-
assert "\x1b[1;36m'.notdef' path\x1b[0m" in captured.out
166+
assert "\x1b[1;96m'.notdef' path\x1b[0m" in captured.out
167167
assert "No contours" in captured.out
168168

169169

@@ -201,7 +201,7 @@ def mock_isatty():
201201
# must be in a tty to get ANSI color output
202202
# this is mocked above
203203
for glyphname in expected_glyphnames:
204-
assert f"\x1b[1;36m'{glyphname}' path\x1b[0m" in captured.out
204+
assert f"\x1b[1;96m'{glyphname}' path\x1b[0m" in captured.out
205205

206206
assert "path.moveTo(869, 377)" in captured.out
207207

@@ -240,7 +240,7 @@ def mock_isatty():
240240
# must be in a tty to get ANSI color output
241241
# this is mocked above
242242
for glyphname in expected_glyphnames:
243-
assert f"\x1b[1;36m'{glyphname}' path\x1b[0m" not in captured.out
243+
assert f"\x1b[1;96m'{glyphname}' path\x1b[0m" not in captured.out
244244
assert f"'{glyphname}' path" in captured.out
245245

246246
assert "path.moveTo(869, 377)" in captured.out

0 commit comments

Comments
 (0)