From: W. Trevor King Date: Thu, 2 Sep 2010 02:37:17 +0000 (-0400) Subject: Updated test/ to match new pformated command line output. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=27760d6210473868e16fa17625bd48287e631c83;p=hooke.git Updated test/ to match new pformated command line output. --- diff --git a/test/block_info.py b/test/block_info.py index d3da920..28780cd 100644 --- a/test/block_info.py +++ b/test/block_info.py @@ -33,20 +33,23 @@ Success False >>> h = r.run_lines(h, ['block_info --output %s name columns "raw info.file*"' ... % file_name]) # doctest: +ELLIPSIS, +REPORT_UDIFF -{'index': 0, 'name': 'approach', 'columns': ['z piezo (m)', 'deflection (m)'], 'raw info': {'filetype': 'picoforce'}} +{'columns': ['z piezo (m)', 'deflection (m)'], + 'index': 0, + 'name': 'approach', + 'raw info': {'filetype': 'picoforce'}} Success >>> with open(file_name, 'r') as f: ... text = f.read() >>> if block_info_already_exists == False: ... os.remove(file_name) ->>> print text +>>> print text # doctest: +ELLIPSIS, +REPORT_UDIFF picoforce.000: approach: columns: [z piezo (m), deflection (m)] index: 0 name: approach raw info: {filetype: picoforce} - path: /tmp/hooke/test/data/picoforce.000 + path: .../test/data/picoforce.000 """ diff --git a/test/command_stack_save_load.py b/test/command_stack_save_load.py index 43172d1..79afa94 100644 --- a/test/command_stack_save_load.py +++ b/test/command_stack_save_load.py @@ -77,7 +77,7 @@ Success ['default'] >>> with open(os.path.join(target_dir, 'default'), 'r') as f: ... print f.read() -- arguments: {input: !!python/unicode 'test/data/test'} +- arguments: {input: test/data/test} command: load playlist - arguments: {} command: get curve @@ -92,7 +92,7 @@ Success ['default', 'my_stack'] >>> with open(os.path.join(target_dir, 'my_stack'), 'r') as f: ... print f.read() -- arguments: {input: !!python/unicode 'test/data/test'} +- arguments: {input: test/data/test} command: load playlist - arguments: {} command: get curve @@ -114,14 +114,14 @@ Success >>> with open(os.path.join(target_dir, 'default'), 'r') as f: ... print f.read() -- arguments: {input: !!python/unicode 'test/data/test'} +- arguments: {input: test/data/test} command: load playlist - arguments: {} command: get curve >>> with open(os.path.join(target_dir, 'my_stack'), 'r') as f: ... print f.read() -- arguments: {input: !!python/unicode 'test/data/test'} +- arguments: {input: test/data/test} command: load playlist - arguments: {} command: get curve diff --git a/test/flat_filter_peaks.py b/test/flat_filter_peaks.py index 87f26e7..d6687ff 100644 --- a/test/flat_filter_peaks.py +++ b/test/flat_filter_peaks.py @@ -27,7 +27,7 @@ Success >>> h = r.run_lines(h, ... ['zero_surface_contact_point --block retract'] ... ) # doctest: +ELLIPSIS, +REPORT_UDIFF -{'info':...} +{'active fitted parameters':...} Success >>> h = r.run_lines(h, ['flat_filter_peaks --block retract'] diff --git a/test/polymer_fit.py b/test/polymer_fit.py index c20ecd7..2920493 100644 --- a/test/polymer_fit.py +++ b/test/polymer_fit.py @@ -28,8 +28,8 @@ Prepare a curve for polymer fitting. Success >>> h = r.run_lines(h, ['zero_surface_contact_point --block retract'] -... ) # doctest: +ELLIPSIS, +REPORT_UDIFF -{'info':...'fitted parameters': [8.413...e-08, 2.812...e-10, 158.581...],...} +... ) # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE, +REPORT_UDIFF +{...'fitted parameters': [8.413...e-08, 2.812...e-10, 158.581...],...} Success >>> h = r.run_lines(h, ['polynomial_flatten --block retract --deflection_column "surface deflection (m)" --degree 1']) diff --git a/test/tutorial.py b/test/tutorial.py index 558f6cf..a00a7f0 100644 --- a/test/tutorial.py +++ b/test/tutorial.py @@ -33,16 +33,15 @@ Documented commands (type help ): ======================================== ... >>> h = r.run_lines(h, ['help load_playlist']) -Command: load_playlist - -Arguments: - -help BOOL (bool) Print a help message. -stack BOOL (bool) Add this command to appropriate command stacks. -output_playlist STRING (string) Name of the new playlist (defaults to - an auto-generated name). -input FILE (file) File name for the input playlist. -drivers DRIVER (driver) Drivers for loading curves. +Usage: load_playlist [options] + +Options: + -h, --help show this help message and exit + --disable-stack Add this command to appropriate command stacks. (True) + --output_playlist=OUTPUT_PLAYLIST + Name of the new playlist (defaults to an auto- + generated name). (None) + --drivers=DRIVERS Drivers for loading curves. (None) Load a playlist. diff --git a/test/unicode_output.py b/test/unicode_output.py index 293b80c..55da09f 100644 --- a/test/unicode_output.py +++ b/test/unicode_output.py @@ -23,7 +23,7 @@ u""" >>> h = Hooke() >>> r = HookeRunner() >>> h = r.run_lines(h, ['help flat_filter_playlist']) # doctest: +REPORT_UDIFF +ELLIPSIS -Command: flat_filter_playlist... +Usage: flat_filter_playlist... F. Musiani, M. Brucale, L. Bubacco, B. Samorì. "Conformational equilibria in monomeric α-Synuclein at the ... diff --git a/test/zero_surface_contact_point.py b/test/zero_surface_contact_point.py index 69cbbef..33249da 100644 --- a/test/zero_surface_contact_point.py +++ b/test/zero_surface_contact_point.py @@ -25,8 +25,8 @@ Success >>> h = r.run_lines(h, ['zero_surface_contact_point --block retract'] -... ) # doctest: +ELLIPSIS, +REPORT_UDIFF -{'info':...'fitted parameters': [8.413...e-08, 2.812...e-10, 158.581...],...} +... ) # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE, +REPORT_UDIFF +{...'fitted parameters': [8.413...e-08, 2.812...e-10, 158.581...],...} Success >>> curve = h.playlists.current().current()