Module Expr Str Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore ListLoad AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr Str Str If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str orelse If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str orelse If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad SubscriptLoad Call AttributeLoad NameLoad attr Index Num attr Assert CompareEq Call AttributeLoad NameLoad attr Num Assert CompareIn Str NameLoad Assert CompareIn Str NameLoad If BoolOpOr UnaryOpNot NameLoad NameLoad body Assert CompareNotIn Str NameLoad Assert CompareIn Str NameLoad Return Assert CompareIn Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str If NameLoad body Assert CompareEq NameLoad Num Assert CompareEq NameLoad Num orelse Assert CompareEq NameLoad Num Assert CompareEq NameLoad Num decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr Str ListLoad NameLoad NameLoad NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str ListLoad NameLoad NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str If Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Assign NameStore ListLoad AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr Str Str Str Call NameLoad NameLoad If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str orelse If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str attr Str Assign NameStore Num orelse If NameLoad body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str attr Str Assign NameStore Num orelse Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str attr Str Assign NameStore Num Assert NameLoad With Call NameLoad NameLoad keyword NameLoad NameStore body Assign NameStore Call NameLoad NameLoad Assert Call NameLoad Call NameLoad NameLoad Num ListComp Call NameLoad NameLoad comprehension NameStore NameLoad NameLoad NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad UnaryOpNot NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str ListLoad TupleLoad NameLoad NameLoad TupleLoad NameLoad NameLoad TupleLoad NameLoad NameLoad TupleLoad NameLoad NameLoad
N/A N/A Test example script. N/A subprocess N/A sys N/A pytest colorclass.windows IS_WINDOWS tests.conftest PROJECT_ROOT tests.screenshot RunNewConsole screenshot_until_match test_piped N/A N/A colors light_bg N/A N/A N/A Test script with output piped to non-tty (this pytest process).

    :param bool colors: Enable, disable, or omit color arguments (default is no colors due to no tty).
    :param bool light_bg: Enable light, dark, or omit light/dark arguments.
     N/A command N/A N/A sys executable N/A str N/A N/A PROJECT_ROOT join example.py print N/A N/A colors True N/A N/A N/A N/A command append --colors N/A N/A N/A colors False N/A N/A N/A N/A command append --no-colors N/A N/A light_bg True N/A N/A N/A N/A command append --light-bg N/A N/A N/A light_bg False N/A N/A N/A N/A command append --dark-bg N/A proc N/A N/A subprocess Popen command stderr N/A subprocess STDOUT stdout N/A subprocess PIPE N/A output N/A N/A N/A N/A N/A proc communicate N/A 0 decode N/A N/A N/A N/A proc poll 0 N/A N/A Autocolors for all backgrounds output N/A N/A Red output N/A N/A N/A colors IS_WINDOWS N/A N/A N/A [ output N/A N/A Black Red Green Yellow Blue Magenta Cyan White output N/A N/A N/A [ output N/A count_dark_fg N/A N/A output count [31mRed N/A count_light_fg N/A N/A output count [91mRed N/A light_bg N/A N/A N/A count_dark_fg 2 N/A N/A count_light_fg 1 N/A N/A N/A count_dark_fg 1 N/A N/A count_light_fg 2 N/A N/A N/A N/A pytest mark parametrize colors N/A True False None N/A N/A N/A pytest mark parametrize light_bg N/A True False None test_windows_screenshot N/A N/A colors light_bg N/A N/A N/A Test script on Windows in a new console window. Take a screenshot to verify colors work.

    :param bool colors: Enable, disable, or omit color arguments (default has colors).
    :param bool light_bg: Create console with white background color.
     N/A screenshot N/A N/A PROJECT_ROOT join image.png N/A N/A N/A screenshot check N/A N/A N/A N/A screenshot remove N/A command N/A N/A sys executable N/A str N/A N/A PROJECT_ROOT join example.py print -w N/A str screenshot N/A N/A colors True N/A N/A N/A N/A command append --colors N/A N/A N/A colors False N/A N/A N/A N/A command append --no-colors N/A N/A colors False N/A N/A candidates N/A N/A N/A N/A PROJECT_ROOT join tests listdir sub_sans_*.bmp N/A expected_count 27 N/A N/A light_bg N/A N/A candidates N/A N/A N/A N/A PROJECT_ROOT join tests listdir sub_dark_fg_*.bmp N/A expected_count 2 N/A N/A candidates N/A N/A N/A N/A PROJECT_ROOT join tests listdir sub_light_fg_*.bmp N/A expected_count 2 N/A candidates N/A N/A RunNewConsole command white_bg light_bg pos N/A N/A box N/A next pos N/A N/A screenshot_until_match N/A str screenshot 15 N/A N/A str p N/A p candidates expected_count box N/A N/A N/A N/A pytest mark skipif N/A str N/A IS_WINDOWS N/A N/A N/A pytest mark parametrize colors,light_bg N/A N/A True False N/A True True N/A False False N/A None False