fix all the tests

This commit is contained in:
Waylon Walker 2023-06-21 10:29:50 -05:00
parent 7db07c7d35
commit a7e6f2c4e5
No known key found for this signature in database
GPG key ID: 66E2BF2B4190EFE4
9 changed files with 128 additions and 137 deletions

View file

@ -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"