fix all the tests
This commit is contained in:
parent
7db07c7d35
commit
a7e6f2c4e5
9 changed files with 128 additions and 137 deletions
|
|
@ -1,14 +1,16 @@
|
|||
from learn_sql_model.console import console
|
||||
|
||||
|
||||
def test_default_console_not_quiet(capsys):
|
||||
console.print("hello")
|
||||
captured = capsys.readouterr()
|
||||
assert captured.out == "hello\n"
|
||||
|
||||
|
||||
def test_default_console_is_quiet(capsys):
|
||||
console.quiet = True
|
||||
|
||||
console.print("hello")
|
||||
captured = capsys.readouterr()
|
||||
assert captured.out == ""
|
||||
|
||||
|
||||
def test_default_console_not_quiet(capsys):
|
||||
|
||||
console.quiet = False
|
||||
console.print("hello")
|
||||
captured = capsys.readouterr()
|
||||
assert captured.out == "hello\n"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue