@@ -56,7 +56,9 @@ def test_direction_run_fail_invalid_glyphname(capsys):
56
56
assert "Failed to open glyph" in captured .err
57
57
58
58
59
- def test_path_run_single_glyph_non_composite_no_contours_default (capsys , monkeypatch ):
59
+ def test_direction_run_single_glyph_non_composite_no_contours_default (
60
+ capsys , monkeypatch
61
+ ):
60
62
def mock_isatty ():
61
63
return True
62
64
@@ -72,7 +74,9 @@ def mock_isatty():
72
74
assert "[ \x1b [1;36m.notdef\x1b [0m ]: no contours" in captured .out
73
75
74
76
75
- def test_path_run_single_glyph_non_composite_no_contours_nocolor (capsys , monkeypatch ):
77
+ def test_direction_run_single_glyph_non_composite_no_contours_nocolor (
78
+ capsys , monkeypatch
79
+ ):
76
80
def mock_isatty ():
77
81
return True
78
82
@@ -88,7 +92,9 @@ def mock_isatty():
88
92
assert "[ .notdef ]: no contours" in captured .out
89
93
90
94
91
- def test_path_run_single_glyph_non_composite_clockwise_default (capsys , monkeypatch ):
95
+ def test_direction_run_single_glyph_non_composite_clockwise_default (
96
+ capsys , monkeypatch
97
+ ):
92
98
def mock_isatty ():
93
99
return True
94
100
@@ -104,7 +110,9 @@ def mock_isatty():
104
110
assert "[ \x1b [1;36mA\x1b [0m ]: clockwise" in captured .out
105
111
106
112
107
- def test_path_run_single_glyph_non_composite_clockwise_nocolor (capsys , monkeypatch ):
113
+ def test_dierection_run_single_glyph_non_composite_clockwise_nocolor (
114
+ capsys , monkeypatch
115
+ ):
108
116
def mock_isatty ():
109
117
return True
110
118
@@ -120,7 +128,9 @@ def mock_isatty():
120
128
assert "[ A ]: clockwise" in captured .out
121
129
122
130
123
- def test_path_run_single_glyph_composite_counter_clockwise_default (capsys , monkeypatch ):
131
+ def test_direction_run_single_glyph_composite_counter_clockwise_default (
132
+ capsys , monkeypatch
133
+ ):
124
134
def mock_isatty ():
125
135
return True
126
136
@@ -137,7 +147,9 @@ def mock_isatty():
137
147
assert "with component 'question' transform: [[-1.0, 0], [0, 1.0]]" in captured .out
138
148
139
149
140
- def test_path_run_single_glyph_composite_counter_clockwise_nocolor (capsys , monkeypatch ):
150
+ def test_direction_run_single_glyph_composite_counter_clockwise_nocolor (
151
+ capsys , monkeypatch
152
+ ):
141
153
def mock_isatty ():
142
154
return True
143
155
@@ -156,3 +168,49 @@ def mock_isatty():
156
168
" with component 'question' transform: [[-1.0, 0], [0, 1.0]]"
157
169
in captured .out
158
170
)
171
+
172
+
173
+ def test_direction_run_full_glyph_default (capsys , monkeypatch ):
174
+ def mock_isatty ():
175
+ return True
176
+
177
+ # apply the monkeypatch for sys.stdout.isatty()
178
+ monkeypatch .setattr (sys .stdout , "isatty" , mock_isatty )
179
+
180
+ args = parser .parse_args ([TESTFONT_PATH_1 ])
181
+ direction_run (args )
182
+
183
+ 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
190
+ assert (
191
+ " with component 'question' transform: [[-1.0, 0], [0, 1.0]]"
192
+ in captured .out
193
+ )
194
+
195
+
196
+ def test_direction_run_full_glyph_nocolor (capsys , monkeypatch ):
197
+ def mock_isatty ():
198
+ return True
199
+
200
+ # apply the monkeypatch for sys.stdout.isatty()
201
+ monkeypatch .setattr (sys .stdout , "isatty" , mock_isatty )
202
+
203
+ args = parser .parse_args (["--nocolor" , TESTFONT_PATH_1 ])
204
+ direction_run (args )
205
+
206
+ captured = capsys .readouterr ()
207
+ assert "[ .notdef ]: no contours" in captured .out
208
+ assert "[ space ]: no contours" in captured .out
209
+ assert "[ comma ]: clockwise" in captured .out
210
+ assert "[ question ]: clockwise" in captured .out
211
+ assert "[ A ]: clockwise" in captured .out
212
+ assert "[ uni2E2E ]: counter-clockwise" in captured .out
213
+ assert (
214
+ " with component 'question' transform: [[-1.0, 0], [0, 1.0]]"
215
+ in captured .out
216
+ )
0 commit comments