Updated test/ to match the new explicit YAML format.
authorW. Trevor King <wking@drexel.edu>
Sun, 22 Aug 2010 05:54:12 +0000 (01:54 -0400)
committerW. Trevor King <wking@drexel.edu>
Sun, 22 Aug 2010 05:54:12 +0000 (01:54 -0400)
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 ;).

test/curve_info.py
test/hemingway_driver.py
test/jpk_driver.py
test/mfp3d_driver.py
test/picoforce_driver.py
test/tutorial.py
test/wtk_driver.py

index 28b14f3..8dfc1eb 100644 (file)
@@ -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: <class 'hooke.experiment.VelocityClamp'>
+experiment: <hooke.experiment.VelocityClamp object at 0x...>
 driver: <hooke.driver.picoforce.PicoForceDriver object at 0x...>
 filetype: picoforce
 note: None
+command stack: []
 blocks: 2
 block sizes: [(2048, 2), (2048, 2)]
 Success
index 3ac273b..5c16cd6 100644 (file)
@@ -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: <class 'hooke.experiment.ForceClamp'>
+experiment: <hooke.experiment.ForceClamp object at 0x...>
 driver: <hooke.driver.hemingway.HemingwayDriver object at 0x...>
 filetype: hemingway
 note: None
+command stack: []
 blocks: 1
 block sizes: [(14798, 5)]
 Success
index 8261c7e..f5b7ea0 100644 (file)
@@ -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: <class 'hooke.experiment.VelocityClamp'>
+experiment: <hooke.experiment.VelocityClamp object at 0x...>
 driver: <hooke.driver.jpk.JPKDriver object at 0x...>
 filetype: jpk
 note: None
+command stack: []
 blocks: 2
 block sizes: [(4096, 6), (4096, 4)]
 Success
index cefb851..a291ae1 100644 (file)
@@ -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: <class 'hooke.experiment.VelocityClamp'>
+experiment: <hooke.experiment.VelocityClamp object at 0x...>
 driver: <hooke.driver.mfp3d.MFP3DDriver object at 0x...>
 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: <class 'hooke.experiment.VelocityClamp'>
+experiment: <hooke.experiment.VelocityClamp object at 0x...>
 driver: <hooke.driver.mfp3d.MFP3DDriver object at 0x...>
 filetype: mfp3d
 note: None
+command stack: []
 blocks: 3
 block sizes: [(506, 3), (6, 3), (496, 3)]
 Success
index d36aa18..bac6783 100644 (file)
@@ -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: <class 'hooke.experiment.VelocityClamp'>
+experiment: <hooke.experiment.VelocityClamp object at 0x...>
 driver: <hooke.driver.picoforce.PicoForceDriver object at 0x...>
 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: <class 'hooke.experiment.VelocityClamp'>
+experiment: <hooke.experiment.VelocityClamp object at 0x...>
 driver: <hooke.driver.picoforce.PicoForceDriver object at 0x...>
 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: <class 'hooke.experiment.VelocityClamp'>
+experiment: <hooke.experiment.VelocityClamp object at 0x...>
 driver: <hooke.driver.picoforce.PicoForceDriver object at 0x...>
 filetype: picoforce
 note: None
+command stack: []
 blocks: 2
 block sizes: [(2048, 2), (2048, 2)]
 Success
index 34bf152..558f6cf 100644 (file)
@@ -96,10 +96,14 @@ False
 >>> h = r.run_lines(h, ['save_playlist --output mylist'])
 Success
 <BLANKLINE>
+>>> h = r.run_lines(h, ['name_playlist my_old_list'])
+<FilePlaylist my_old_list>
+Success
+<BLANKLINE>
 >>> os.path.isfile('mylist.hkp')
 True
 >>> h = r.run_lines(h, ['load_playlist mylist.hkp'])
-<FilePlaylist mylist.hkp>
+<FilePlaylist mylist>
 Success
 <BLANKLINE>
 >>> if playlist_already_exists == False:
@@ -163,22 +167,24 @@ Success
 Success
 <BLANKLINE>
 
+>>> [p for p in h.playlists]
+[<FilePlaylist my_old_list>, <FilePlaylist mylist>]
 >>> h = r.run_lines(h, ['get_playlist'])
-<FilePlaylist mylist>
+<FilePlaylist my_old_list>
 Success
 <BLANKLINE>
 >>> h = r.run_lines(h, ['next_playlist'])
 Success
 <BLANKLINE>
 >>> h = r.run_lines(h, ['get_playlist'])
-<FilePlaylist mylist.hkp>
+<FilePlaylist mylist>
 Success
 <BLANKLINE>
 >>> h = r.run_lines(h, ['previous_playlist'])
 Success
 <BLANKLINE>
 >>> h = r.run_lines(h, ['get_playlist'])
-<FilePlaylist mylist>
+<FilePlaylist my_old_list>
 Success
 <BLANKLINE>
 >>> h = r.run_lines(h, ['playlist_index'])
@@ -189,7 +195,7 @@ Success
 Success
 <BLANKLINE>
 >>> h = r.run_lines(h, ['get_playlist'])
-<FilePlaylist mylist.hkp>
+<FilePlaylist mylist>
 Success
 <BLANKLINE>
 >>> h = r.run_lines(h, ['playlist_index'])
@@ -200,7 +206,7 @@ Success
 Success
 <BLANKLINE>
 >>> h = r.run_lines(h, ['get_playlist'])
-<FilePlaylist mylist>
+<FilePlaylist my_old_list>
 Success
 <BLANKLINE>
 >>> h = r.run_lines(h, ['playlist_index'])
@@ -211,7 +217,7 @@ Success
 Success
 <BLANKLINE>
 >>> h = r.run_lines(h, ['get_playlist'])
-<FilePlaylist mylist.hkp>
+<FilePlaylist mylist>
 Success
 <BLANKLINE>
 >>> h = r.run_lines(h, ['playlist_index'])
index f34907c..0c9068a 100644 (file)
@@ -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: <class 'hooke.experiment.VelocityClamp'>
+experiment: <hooke.experiment.VelocityClamp object at 0x...>
 driver: <hooke.driver.wtk.WTKDriver object at 0x...>
 filetype: wtk
 note: None
+command stack: []
 blocks: 2
 block sizes: [(810, 2), (8001, 2)]
 Success