diff --git a/.coveragerc b/.coveragerc index af54654c..daa6da45 100644 --- a/.coveragerc +++ b/.coveragerc @@ -4,6 +4,7 @@ source = plumbum omit = *ipython*.py + __main__.py [report] exclude_lines = diff --git a/plumbum/cli/terminal.py b/plumbum/cli/terminal.py index 6f81038e..0365b0c3 100644 --- a/plumbum/cli/terminal.py +++ b/plumbum/cli/terminal.py @@ -13,6 +13,7 @@ def readline(message = ""): """Gets a line of input from the user (stdin)""" sys.stdout.write(message) + sys.stdout.flush() return sys.stdin.readline() def ask(question, default = None): @@ -164,7 +165,7 @@ def read_chunk(): skipped = False -def pager(rows, pagercmd = None): +def pager(rows, pagercmd = None): # pragma: no cover """Opens a pager (e.g., ``less``) to display the given text. Requires a terminal. :param rows: a ``bytes`` or a list/iterator of "rows" (``bytes``) diff --git a/plumbum/colorlib/__init__.py b/plumbum/colorlib/__init__.py index 1e753668..3c4958f1 100644 --- a/plumbum/colorlib/__init__.py +++ b/plumbum/colorlib/__init__.py @@ -20,7 +20,7 @@ def load_ipython_extension(ipython): # pragma: no cover ipython.push({"colors":htmlcolors}) ipython.register_magics(OutputMagics) -def main(): +def main(): # pragma: no cover """Color changing script entry. Call using python -m plumbum.colors, will reset if no arguments given.""" import sys diff --git a/pytest.ini b/pytest.ini index 9ca54d22..984b4121 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,7 +1,7 @@ [pytest] # This is for py.test -f with xdist plugin -looponfailroots = . plumbum +looponfailroots = tests plumbum addopts = -v -rswx