Ignore unreachable code in test environment, we have now 99% of coverage
This commit is contained in:
parent
7173d13495
commit
3416ce2ac3
|
@ -7,7 +7,7 @@ class Bootstrap:
|
|||
|
||||
@staticmethod
|
||||
def run_game():
|
||||
with TermManager() as term_manager:
|
||||
with TermManager() as term_manager: # pragma: no cover
|
||||
game = Game()
|
||||
game.new_game()
|
||||
display = DisplayManager(term_manager.screen, game)
|
||||
|
|
|
@ -41,7 +41,8 @@ class DisplayManager:
|
|||
If the window got resized, ensure that the screen size got updated.
|
||||
"""
|
||||
y, x = self.screen.getmaxyx() if self.screen else (0, 0)
|
||||
if self.screen and curses.is_term_resized(self.rows, self.cols):
|
||||
if self.screen and curses.is_term_resized(self.rows,
|
||||
self.cols): # pragma: nocover
|
||||
curses.resizeterm(y, x)
|
||||
return True
|
||||
return False
|
||||
|
|
|
@ -2,7 +2,7 @@ import curses
|
|||
from types import TracebackType
|
||||
|
||||
|
||||
class TermManager:
|
||||
class TermManager: # pragma: no cover
|
||||
def __init__(self):
|
||||
self.screen = curses.initscr()
|
||||
# convert escapes sequences to curses abstraction
|
||||
|
|
Loading…
Reference in New Issue