From: W. Trevor King Date: Sun, 22 Aug 2010 05:54:12 +0000 (-0400) Subject: Updated test/ to match the new explicit YAML format. X-Git-Url: http://git.tremily.us/?p=hooke.git;a=commitdiff_plain;h=36519f16336ba25e87def3e38f4ba3337da6c6c8 Updated test/ to match the new explicit YAML format. And other minor tweaks to get things passing again. $ nosetests --with-doctest --doctest-tests -vv test/ 2>&1 | less ... Ran 27 tests in 43.349s OK Note that the tutorial.py and note.py tests were going so slowly before (but are fast again now) because I was (re)loading playlist/curve/etc. items in .__setstate__, when they are supposed to be set with `listitems`. If you're going to go messing around with __getstate__ or __setstate__, it would be a good idea to read http://www.python.org/dev/peps/pep-0307/ (especially Case 2 and Case 3) *carefully* before wasting a bunch of time and confusion bungling around like I did ;). --- diff --git a/test/curve_info.py b/test/curve_info.py index 28b14f3..8dfc1eb 100644 --- a/test/curve_info.py +++ b/test/curve_info.py @@ -27,10 +27,11 @@ Success >>> h = r.run_lines(h, ['curve_info']) # doctest: +ELLIPSIS, +REPORT_UDIFF name: picoforce.000 path: .../test/data/picoforce.000 -experiment: +experiment: driver: filetype: picoforce note: None +command stack: [] blocks: 2 block sizes: [(2048, 2), (2048, 2)] Success diff --git a/test/hemingway_driver.py b/test/hemingway_driver.py index 3ac273b..5c16cd6 100644 --- a/test/hemingway_driver.py +++ b/test/hemingway_driver.py @@ -29,10 +29,11 @@ Success >>> h = r.run_lines(h, ['curve_info']) # doctest: +ELLIPSIS, +REPORT_UDIFF name: 20080428_a53t-0-0-10.dat path: .../test/data/fclamp_hemingway/20080428_a53t-0-0-10.dat -experiment: +experiment: driver: filetype: hemingway note: None +command stack: [] blocks: 1 block sizes: [(14798, 5)] Success diff --git a/test/jpk_driver.py b/test/jpk_driver.py index 8261c7e..f5b7ea0 100644 --- a/test/jpk_driver.py +++ b/test/jpk_driver.py @@ -29,10 +29,11 @@ Success >>> h = r.run_lines(h, ['curve_info']) # doctest: +ELLIPSIS, +REPORT_UDIFF name: 2009.04.23-15.15.47.jpk path: .../test/data/vclamp_jpk/2009.04.23-15.15.47.jpk -experiment: +experiment: driver: filetype: jpk note: None +command stack: [] blocks: 2 block sizes: [(4096, 6), (4096, 4)] Success diff --git a/test/mfp3d_driver.py b/test/mfp3d_driver.py index cefb851..a291ae1 100644 --- a/test/mfp3d_driver.py +++ b/test/mfp3d_driver.py @@ -29,10 +29,11 @@ Success >>> h = r.run_lines(h, ['curve_info']) # doctest: +ELLIPSIS, +REPORT_UDIFF name: Line0004Point0000.ibw path: .../test/data/vclamp_mfp3d/Line0004Point0000.ibw -experiment: +experiment: driver: filetype: mfp3d note: None +command stack: [] blocks: 3 block sizes: [(491, 2), (497, 2), (105, 2)] Success @@ -46,10 +47,11 @@ Success >>> h = r.run_lines(h, ['curve_info']) # doctest: +ELLIPSIS, +REPORT_UDIFF name: Image0396.ibw path: .../test/data/vclamp_mfp3d/Image0396.ibw -experiment: +experiment: driver: filetype: mfp3d note: None +command stack: [] blocks: 3 block sizes: [(506, 3), (6, 3), (496, 3)] Success diff --git a/test/picoforce_driver.py b/test/picoforce_driver.py index d36aa18..bac6783 100644 --- a/test/picoforce_driver.py +++ b/test/picoforce_driver.py @@ -29,10 +29,11 @@ Success >>> h = r.run_lines(h, ['curve_info']) # doctest: +ELLIPSIS, +REPORT_UDIFF name: 20071120a_i27_t33.100 path: .../test/data/vclamp_picoforce/20071120a_i27_t33.100 -experiment: +experiment: driver: filetype: picoforce note: None +command stack: [] blocks: 2 block sizes: [(2048, 2), (2048, 2)] Success @@ -46,10 +47,11 @@ Success >>> h = r.run_lines(h, ['curve_info']) # doctest: +ELLIPSIS, +REPORT_UDIFF name: 0x07200000 path: .../test/data/vclamp_picoforce/0x07200000 -experiment: +experiment: driver: filetype: picoforce note: None +command stack: [] blocks: 2 block sizes: [(512, 2), (512, 2)] Success @@ -60,10 +62,11 @@ Success >>> h = r.run_lines(h, ['curve_info']) # doctest: +ELLIPSIS, +REPORT_UDIFF name: 0x06130001 path: .../test/data/vclamp_picoforce/0x06130001 -experiment: +experiment: driver: filetype: picoforce note: None +command stack: [] blocks: 2 block sizes: [(2048, 2), (2048, 2)] Success diff --git a/test/tutorial.py b/test/tutorial.py index 34bf152..558f6cf 100644 --- a/test/tutorial.py +++ b/test/tutorial.py @@ -96,10 +96,14 @@ False >>> h = r.run_lines(h, ['save_playlist --output mylist']) Success +>>> h = r.run_lines(h, ['name_playlist my_old_list']) + +Success + >>> os.path.isfile('mylist.hkp') True >>> h = r.run_lines(h, ['load_playlist mylist.hkp']) - + Success >>> if playlist_already_exists == False: @@ -163,22 +167,24 @@ Success Success +>>> [p for p in h.playlists] +[, ] >>> h = r.run_lines(h, ['get_playlist']) - + Success >>> h = r.run_lines(h, ['next_playlist']) Success >>> h = r.run_lines(h, ['get_playlist']) - + Success >>> h = r.run_lines(h, ['previous_playlist']) Success >>> h = r.run_lines(h, ['get_playlist']) - + Success >>> h = r.run_lines(h, ['playlist_index']) @@ -189,7 +195,7 @@ Success Success >>> h = r.run_lines(h, ['get_playlist']) - + Success >>> h = r.run_lines(h, ['playlist_index']) @@ -200,7 +206,7 @@ Success Success >>> h = r.run_lines(h, ['get_playlist']) - + Success >>> h = r.run_lines(h, ['playlist_index']) @@ -211,7 +217,7 @@ Success Success >>> h = r.run_lines(h, ['get_playlist']) - + Success >>> h = r.run_lines(h, ['playlist_index']) diff --git a/test/wtk_driver.py b/test/wtk_driver.py index f34907c..0c9068a 100644 --- a/test/wtk_driver.py +++ b/test/wtk_driver.py @@ -44,10 +44,11 @@ Success >>> h = r.run_lines(h, ['curve_info']) # doctest: +ELLIPSIS, +REPORT_UDIFF name: 20100504144209_unfold path: .../test/data/vclamp_wtk/unfold/20100504/20100504144209_unfold -experiment: +experiment: driver: filetype: wtk note: None +command stack: [] blocks: 2 block sizes: [(810, 2), (8001, 2)] Success