From 7fc847b3b5c52ff1f1ca632112bb9543e803940e Mon Sep 17 00:00:00 2001 From: Jared Crapo Date: Sun, 20 Aug 2017 12:49:12 -0600 Subject: Move transcripts into their own directory --- tests/multiline_transcript.txt | 10 ------ tests/test_transcript.py | 6 ++-- tests/transcript.txt | 57 ------------------------------ tests/transcript_regex.txt | 17 --------- tests/transcripts/multiline_transcript.txt | 10 ++++++ tests/transcripts/transcript.txt | 57 ++++++++++++++++++++++++++++++ tests/transcripts/transcript_regex.txt | 17 +++++++++ 7 files changed, 87 insertions(+), 87 deletions(-) delete mode 100644 tests/multiline_transcript.txt delete mode 100644 tests/transcript.txt delete mode 100644 tests/transcript_regex.txt create mode 100644 tests/transcripts/multiline_transcript.txt create mode 100644 tests/transcripts/transcript.txt create mode 100644 tests/transcripts/transcript_regex.txt (limited to 'tests') diff --git a/tests/multiline_transcript.txt b/tests/multiline_transcript.txt deleted file mode 100644 index 5fe9122c..00000000 --- a/tests/multiline_transcript.txt +++ /dev/null @@ -1,10 +0,0 @@ -# cmd2 will skip any lines -# which occur before a valid -# command prompt - -(Cmd) orate This is a test -> of the -> emergency broadcast system -This is a test -of the -emergency broadcast system diff --git a/tests/test_transcript.py b/tests/test_transcript.py index 2400066e..bf0005ea 100644 --- a/tests/test_transcript.py +++ b/tests/test_transcript.py @@ -240,7 +240,7 @@ def test_transcript_from_cmdloop(request, capsys): # Get location of the transcript test_dir = os.path.dirname(request.module.__file__) - transcript_file = os.path.join(test_dir, 'transcript.txt') + transcript_file = os.path.join(test_dir, 'transcripts/transcript.txt') # Need to patch sys.argv so cmd2 doesn't think it was called with arguments equal to the py.test args testargs = ['prog', '-t', transcript_file] @@ -266,7 +266,7 @@ def test_multiline_command_transcript_with_comments_at_beginning(request, capsys # Get location of the transcript test_dir = os.path.dirname(request.module.__file__) - transcript_file = os.path.join(test_dir, 'multiline_transcript.txt') + transcript_file = os.path.join(test_dir, 'transcripts/multiline_transcript.txt') # Need to patch sys.argv so cmd2 doesn't think it was called with arguments equal to the py.test args testargs = ['prog', '-t', transcript_file] @@ -299,7 +299,7 @@ def test_regex_transcript(request, capsys): # Get location of the transcript test_dir = os.path.dirname(request.module.__file__) - transcript_file = os.path.join(test_dir, 'transcript_regex.txt') + transcript_file = os.path.join(test_dir, 'transcripts/transcript_regex.txt') # Need to patch sys.argv so cmd2 doesn't think it was called with arguments equal to the py.test args testargs = ['prog', '-t', transcript_file] diff --git a/tests/transcript.txt b/tests/transcript.txt deleted file mode 100644 index e95b9b39..00000000 --- a/tests/transcript.txt +++ /dev/null @@ -1,57 +0,0 @@ -(Cmd) help - -Documented commands (type help ): -======================================== -_relative_load edit history orate pyscript run say shell show -cmdenvironment help load py quit save set shortcuts speak - -(Cmd) help say -Repeats what you tell me to. -Usage: speak [options] (text to say) - -Options: - -h, --help show this help message and exit - -p, --piglatin atinLay - -s, --shout N00B EMULATION MODE - -r REPEAT, --repeat=REPEAT - output [n] times - -(Cmd) say goodnight, Gracie -goodnight, Gracie -(Cmd) say -ps --repeat=5 goodnight, Gracie -OODNIGHT, GRACIEGAY -OODNIGHT, GRACIEGAY -OODNIGHT, GRACIEGAY -(Cmd) set maxrepeats 5 -maxrepeats - was: 3 -now: 5 -(Cmd) say -ps --repeat=5 goodnight, Gracie -OODNIGHT, GRACIEGAY -OODNIGHT, GRACIEGAY -OODNIGHT, GRACIEGAY -OODNIGHT, GRACIEGAY -OODNIGHT, GRACIEGAY -(Cmd) hi --------------------------[1] -help --------------------------[2] -help say --------------------------[3] -say goodnight, Gracie --------------------------[4] -say -ps --repeat=5 goodnight, Gracie --------------------------[5] -set maxrepeats 5 --------------------------[6] -say -ps --repeat=5 goodnight, Gracie -(Cmd) run 4 -say -ps --repeat=5 goodnight, Gracie - -OODNIGHT, GRACIEGAY -OODNIGHT, GRACIEGAY -OODNIGHT, GRACIEGAY -OODNIGHT, GRACIEGAY -OODNIGHT, GRACIEGAY -(Cmd) set prompt "---> " -prompt - was: (Cmd) -now: ---> diff --git a/tests/transcript_regex.txt b/tests/transcript_regex.txt deleted file mode 100644 index a310224b..00000000 --- a/tests/transcript_regex.txt +++ /dev/null @@ -1,17 +0,0 @@ -# Run this transcript with "python example.py -t transcript_regex.txt" -# The regex for colors is because no color on Windows. -# The regex for editor will match whatever program you use. -(Cmd) set -abbrev: True -autorun_on_edit: False -colors: /(True|False)/ -continuation_prompt: > -debug: False -echo: False -editor: /.*/ -feedback_to_output: False -locals_in_py: True -maxrepeats: 3 -prompt: (Cmd) -quiet: False -timing: False diff --git a/tests/transcripts/multiline_transcript.txt b/tests/transcripts/multiline_transcript.txt new file mode 100644 index 00000000..5fe9122c --- /dev/null +++ b/tests/transcripts/multiline_transcript.txt @@ -0,0 +1,10 @@ +# cmd2 will skip any lines +# which occur before a valid +# command prompt + +(Cmd) orate This is a test +> of the +> emergency broadcast system +This is a test +of the +emergency broadcast system diff --git a/tests/transcripts/transcript.txt b/tests/transcripts/transcript.txt new file mode 100644 index 00000000..e95b9b39 --- /dev/null +++ b/tests/transcripts/transcript.txt @@ -0,0 +1,57 @@ +(Cmd) help + +Documented commands (type help ): +======================================== +_relative_load edit history orate pyscript run say shell show +cmdenvironment help load py quit save set shortcuts speak + +(Cmd) help say +Repeats what you tell me to. +Usage: speak [options] (text to say) + +Options: + -h, --help show this help message and exit + -p, --piglatin atinLay + -s, --shout N00B EMULATION MODE + -r REPEAT, --repeat=REPEAT + output [n] times + +(Cmd) say goodnight, Gracie +goodnight, Gracie +(Cmd) say -ps --repeat=5 goodnight, Gracie +OODNIGHT, GRACIEGAY +OODNIGHT, GRACIEGAY +OODNIGHT, GRACIEGAY +(Cmd) set maxrepeats 5 +maxrepeats - was: 3 +now: 5 +(Cmd) say -ps --repeat=5 goodnight, Gracie +OODNIGHT, GRACIEGAY +OODNIGHT, GRACIEGAY +OODNIGHT, GRACIEGAY +OODNIGHT, GRACIEGAY +OODNIGHT, GRACIEGAY +(Cmd) hi +-------------------------[1] +help +-------------------------[2] +help say +-------------------------[3] +say goodnight, Gracie +-------------------------[4] +say -ps --repeat=5 goodnight, Gracie +-------------------------[5] +set maxrepeats 5 +-------------------------[6] +say -ps --repeat=5 goodnight, Gracie +(Cmd) run 4 +say -ps --repeat=5 goodnight, Gracie + +OODNIGHT, GRACIEGAY +OODNIGHT, GRACIEGAY +OODNIGHT, GRACIEGAY +OODNIGHT, GRACIEGAY +OODNIGHT, GRACIEGAY +(Cmd) set prompt "---> " +prompt - was: (Cmd) +now: ---> diff --git a/tests/transcripts/transcript_regex.txt b/tests/transcripts/transcript_regex.txt new file mode 100644 index 00000000..a310224b --- /dev/null +++ b/tests/transcripts/transcript_regex.txt @@ -0,0 +1,17 @@ +# Run this transcript with "python example.py -t transcript_regex.txt" +# The regex for colors is because no color on Windows. +# The regex for editor will match whatever program you use. +(Cmd) set +abbrev: True +autorun_on_edit: False +colors: /(True|False)/ +continuation_prompt: > +debug: False +echo: False +editor: /.*/ +feedback_to_output: False +locals_in_py: True +maxrepeats: 3 +prompt: (Cmd) +quiet: False +timing: False -- cgit v1.2.1