Add a `Delete` button to the GUI NavBar, and cleanup deletion callbacks.
[hooke.git] / test / block_info.py
index d3da9208c0059541a4e52f1c5d784419a78bd8c3..69f732c40952b472a74e3e601e3255f819b374d4 100644 (file)
@@ -1,20 +1,19 @@
-# Copyright (C) 2010 W. Trevor King <wking@drexel.edu>
+# Copyright (C) 2010-2012 W. Trevor King <wking@drexel.edu>
 #
 # This file is part of Hooke.
 #
-# Hooke is free software: you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
+# Hooke is free software: you can redistribute it and/or modify it under the
+# terms of the GNU Lesser General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option) any
+# later version.
 #
-# Hooke is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
-# Public License for more details.
+# Hooke is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
+# details.
 #
-# You should have received a copy of the GNU Lesser General Public
-# License along with Hooke.  If not, see
-# <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU Lesser General Public License
+# along with Hooke.  If not, see <http://www.gnu.org/licenses/>.
 
 """
 >>> import os
@@ -31,22 +30,26 @@ Success
 >>> block_info_already_exists = os.path.exists(file_name)
 >>> block_info_already_exists
 False
->>> h = r.run_lines(h, ['block_info --output %s name columns "raw info.file*"'
+>>> h = r.run_lines(h, ['block_info --output %s name columns "raw info.Scanner list.Serial n*"'
 ...                     % 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': {'Scanner list': {'Serial number': '196PF'}}}
 Success
 <BLANKLINE>
 >>> 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
+    raw info:
+      Scanner list: {Serial number: 196PF}
+  path: .../test/data/picoforce.000
 <BLANKLINE>
 """