Skip to content

Commit

Permalink
BUGFIX: flush was not being called for terminal actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
henryiii committed Nov 18, 2015
1 parent 180d4a5 commit cbd4c5b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .coveragerc
Expand Up @@ -4,6 +4,7 @@ source =
plumbum
omit =
*ipython*.py
__main__.py

[report]
exclude_lines =
Expand Down
3 changes: 2 additions & 1 deletion plumbum/cli/terminal.py
Expand Up @@ -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):
Expand Down Expand Up @@ -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``)
Expand Down
2 changes: 1 addition & 1 deletion plumbum/colorlib/__init__.py
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pytest.ini
@@ -1,7 +1,7 @@
[pytest]

# This is for py.test -f with xdist plugin
looponfailroots = . plumbum
looponfailroots = tests plumbum

addopts = -v -rswx

Expand Down

0 comments on commit cbd4c5b

Please sign in to comment.