Skip to content

Commit

Permalink
STY: formatting / linting (e.g. replace lambda)
Browse files Browse the repository at this point in the history
  • Loading branch information
fedarko committed Sep 20, 2022
1 parent a192c58 commit a6ffff8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion strainflye/cli_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ def fancystart(
t0 = time.time()

# definitely overkill
fancyprint = lambda text: print(text, flush=True)
def fancyprint(text):
print(text, flush=True)

def fancylog(msg, prefix=prefix):
"""Logs a message.
Expand Down
5 changes: 3 additions & 2 deletions strainflye/tests/test_cli_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_fancylogging_extrainfo(capsys):
*test_params,
prefix="PREFIX ",
extra_info=("Verbose?: Yes", "Sus?: Yeet"),
version=False
version=False,
)
exp_out = (
"PREFIX strainFlye testing @ 0.00s: Starting...\n"
Expand All @@ -58,7 +58,7 @@ def test_fancylogging_version(capsys):
)
fancylog = fancystart(*test_params, prefix="PREFIX ")
exp_out = (
f"Using strainFlye version \"{__version__}\".\n"
f'Using strainFlye version "{__version__}".\n'
"PREFIX strainFlye testing @ 0.00s: Starting...\n"
"Input in1: Input #1\n"
"Input in2: Input #2\n"
Expand All @@ -72,6 +72,7 @@ def test_fancylogging_version(capsys):
captured = capsys.readouterr()
assert captured.out == "strainFlye testing @ 0.00s: howdy\n"


def test_b2y():
assert b2y(True) == "Yes"
assert b2y(1) == "Yes"
Expand Down

0 comments on commit a6ffff8

Please sign in to comment.