File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -291,6 +291,7 @@ def __init__(
291291 data : str ,
292292 line : int ,
293293 ) -> None :
294+ assert isinstance (parent , DataFileCollector )
294295 super ().__init__ (name , parent )
295296 self .suite = suite
296297 self .file = file
Original file line number Diff line number Diff line change @@ -638,7 +638,6 @@ def initialize_win_colors(self) -> bool:
638638 # Windows ANSI escape sequences are only supported on Threshold 2 and above.
639639 # we check with an assert at runtime and an if check for mypy, as asserts do not
640640 # yet narrow platform
641- assert sys .platform == "win32" , "Running not on Windows"
642641 if sys .platform == "win32" : # needed to find win specific sys apis
643642 winver = sys .getwindowsversion ()
644643 if (
@@ -660,7 +659,8 @@ def initialize_win_colors(self) -> bool:
660659 | ENABLE_VIRTUAL_TERMINAL_PROCESSING ,
661660 )
662661 self .initialize_vt100_colors ()
663- return True
662+ return True
663+ assert False , "Running not on Windows"
664664
665665 def initialize_unix_colors (self ) -> bool :
666666 """Return True if initialization was successful and we can use colors, False otherwise"""
You can’t perform that action at this time.
0 commit comments