File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Write Your Python Program - CHANGELOG
22
3+ * 2.2.2 (2026-04-03)
4+ * Fixed package hiding bug
35* 2.2.1 (2026-03-26)
46 * Functionality for running standard unit tests
57* 2.2.0 (2026-03-17)
Original file line number Diff line number Diff line change 33 "displayName" : " Write Your Python Program!" ,
44 "description" : " A user friendly python environment for beginners" ,
55 "license" : " See license in LICENSE" ,
6- "version" : " 2.2.1 " ,
6+ "version" : " 2.2.2 " ,
77 "publisher" : " StefanWehr" ,
88 "icon" : " icon.png" ,
99 "engines" : {
Original file line number Diff line number Diff line change 11import re
2+ import sys
3+ import os
24
35RESET = "\u001b [0;0m"
46BOLD = "\u001b [1m"
2123YELLOW = "\u001b [1;33m"
2224WHITE = "\u001b [1;37m"
2325
26+ def useColors ():
27+ if os .environ .get ("WYPP_FORCE_COLORS" ) == "True" :
28+ return True
29+ if "NO_COLOR" in os .environ :
30+ return False
31+ if not sys .stdout .isatty ():
32+ return False
33+ if os .environ .get ("TERM" ) == "dumb" :
34+ return False
35+ return True
36+
2437def color (s , color ):
25- return color + s + RESET
38+ if useColors ():
39+ return color + s + RESET
40+ else :
41+ return s
2642
2743def green (s ):
2844 return color (s , GREEN + BOLD )
Original file line number Diff line number Diff line change @@ -253,6 +253,7 @@ def _runTest(testFile: str,
253253 env = os .environ .copy ()
254254 env ['PYTHONPATH' ] = os .pathsep .join ([os .path .join (ctx .opts .baseDir , 'code' )] + pythonPath )
255255 env ['WYPP_UNDER_TEST' ] = 'True'
256+ env ['WYPP_FORCE_COLORS' ] = 'True'
256257 debug (' ' .join (cmd ))
257258 with open (actualStdoutFile , 'w' ) as stdoutFile , \
258259 open (actualStderrFile , 'w' ) as stderrFile :
You can’t perform that action at this time.
0 commit comments