summaryrefslogtreecommitdiff
path: root/tests/test_transcript.py
diff options
context:
space:
mode:
authorkotfu <kotfu@kotfu.net>2018-05-03 10:43:49 -0700
committerkotfu <kotfu@kotfu.net>2018-05-03 10:49:20 -0700
commit6d2f520b5a5a7165f2406816592b01983b1feb26 (patch)
treecb30ffca0f7abc68e43cfaf039148be11c315784 /tests/test_transcript.py
parentc539ef4065e9ae8611e1851eaa740f6412f08c25 (diff)
downloadcmd2-git-6d2f520b5a5a7165f2406816592b01983b1feb26.tar.gz
Moved some argparse tests from test_transcript.py to test_argparse.py
Diffstat (limited to 'tests/test_transcript.py')
-rw-r--r--tests/test_transcript.py31
1 files changed, 0 insertions, 31 deletions
diff --git a/tests/test_transcript.py b/tests/test_transcript.py
index c5263c03..b4e10b60 100644
--- a/tests/test_transcript.py
+++ b/tests/test_transcript.py
@@ -95,13 +95,6 @@ def _cmdline_app():
return c
-@pytest.fixture
-def _demo_app():
- c = DemoApp()
- c.stdout = StdOut()
- return c
-
-
def _get_transcript_blocks(transcript):
cmd = None
expected = ''
@@ -188,24 +181,6 @@ class TestMyAppCase(cmd2.Cmd2TestCase):
CmdApp.testfiles = ['tests/transcript.txt']
-def test_comment_stripping(_cmdline_app):
- out = run_cmd(_cmdline_app, 'speak it was /* not */ delicious! # Yuck!')
- expected = normalize("""it was delicious!""")
- assert out == expected
-
-
-def test_argparser_correct_args_with_quotes_and_midline_options(_cmdline_app):
- out = run_cmd(_cmdline_app, "speak 'This is a' -s test of the emergency broadcast system!")
- expected = normalize("""THIS IS A TEST OF THE EMERGENCY BROADCAST SYSTEM!""")
- assert out == expected
-
-
-def test_argparser_options_with_spaces_in_quotes(_demo_app):
- out = run_cmd(_demo_app, "hello foo -n 'Bugs Bunny' bar baz")
- expected = normalize("""Hello Bugs Bunny""")
- assert out == expected
-
-
def test_commands_at_invocation():
testargs = ["prog", "say hello", "say Gracie", "quit"]
expected = "This is an intro banner ...\nhello\nGracie\n"
@@ -216,12 +191,6 @@ def test_commands_at_invocation():
out = app.stdout.buffer
assert out == expected
-def test_invalid_syntax(_cmdline_app, capsys):
- run_cmd(_cmdline_app, 'speak "')
- out, err = capsys.readouterr()
- expected = normalize("""ERROR: Invalid syntax: No closing quotation""")
- assert normalize(str(err)) == expected
-
@pytest.mark.parametrize('filename, feedback_to_output', [
('bol_eol.txt', False),