mailr26926 - in /branches/nmrglue/test_suite: system_tests/nmrglue.py unit_tests/_lib/test_io.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by tlinnet on December 03, 2014 - 18:38:
Author: tlinnet
Date: Wed Dec  3 18:38:13 2014
New Revision: 26926

URL: http://svn.gna.org/viewcvs/relax?rev=26926&view=rev
Log:
Moved the systemtest of getting a file list with lib.io.get_file_list() 
function into unit test.

Task #7873 (https://gna.org/task/index.php?7873): Write wrapper function to 
nmrglue, to read .ft2 files and process them.
Homepage: http://www.nmrglue.com/
Link to nmrglue discussion: 
https://groups.google.com/forum/#!forum/nmrglue-discuss
The code is develop at Github: https://github.com/jjhelmus/nmrglue/
Google code: https://code.google.com/p/nmrglue/
Documentation: http://nmrglue.readthedocs.org/en/latest/index.html

Modified:
    branches/nmrglue/test_suite/system_tests/nmrglue.py
    branches/nmrglue/test_suite/unit_tests/_lib/test_io.py

Modified: branches/nmrglue/test_suite/system_tests/nmrglue.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/nmrglue/test_suite/system_tests/nmrglue.py?rev=26926&r1=26925&r2=26926&view=diff
==============================================================================
--- branches/nmrglue/test_suite/system_tests/nmrglue.py (original)
+++ branches/nmrglue/test_suite/system_tests/nmrglue.py Wed Dec  3 18:38:13 
2014
@@ -52,23 +52,6 @@
         ds.ng_test = status.install_path +sep+ 'extern' +sep+ 'nmrglue' 
+sep+ 'nmrglue_0_4' +sep+ 'tests' +sep+ 'pipe_proc_tests'
 
 
-    def test_get_file_list(self):
-        """Test getting a file list with glob."""
-
-        # Define base path to files.
-        base_path = status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'repeated_analysis'+sep+'SOD1'
-
-        # Define folder to all ft files.
-        ft2_folder_1 = base_path +sep+ 'cpmg_disp_sod1d90a_060518' +sep+ 
'cpmg_disp_sod1d90a_060518_normal.fid' +sep+ 'ft2_data'
-
-        # Get the file list matching a glob pattern.
-        ft2_glob_pat = '128_*_FT.ft2'
-        basename_list, file_root_list = 
get_file_list(glob_pattern=ft2_glob_pat, dir=ft2_folder_1)
-
-        self.assertEqual(basename_list, ['128_0_FT.ft2', '128_1_FT.ft2'])
-        self.assertEqual(file_root_list, ['128_0_FT', '128_1_FT'])
-
-
     def test_nmrglue_read(self):
         """Test the userfunction spectrum.nmrglue_read."""
 

Modified: branches/nmrglue/test_suite/unit_tests/_lib/test_io.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/nmrglue/test_suite/unit_tests/_lib/test_io.py?rev=26926&r1=26925&r2=26926&view=diff
==============================================================================
--- branches/nmrglue/test_suite/unit_tests/_lib/test_io.py      (original)
+++ branches/nmrglue/test_suite/unit_tests/_lib/test_io.py      Wed Dec  3 
18:38:13 2014
@@ -25,6 +25,7 @@
 
 # relax module imports.
 import lib.io
+from status import Status; status = Status()
 
 
 class Test_io(TestCase):
@@ -67,6 +68,23 @@
         self.assertEqual(lib.io.get_file_path(file3), file3)
 
 
+    def test_get_file_list(self):
+        """Test getting a file list with glob through 
lib.io.get_file_list."""
+
+        # Define base path to files.
+        base_path = status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'repeated_analysis'+sep+'SOD1'
+
+        # Define folder to all ft files.
+        ft2_folder_1 = base_path +sep+ 'cpmg_disp_sod1d90a_060518' +sep+ 
'cpmg_disp_sod1d90a_060518_normal.fid' +sep+ 'ft2_data'
+
+        # Get the file list matching a glob pattern.
+        ft2_glob_pat = '128_*_FT.ft2'
+        basename_list, file_root_list = 
lib.io.get_file_list(glob_pattern=ft2_glob_pat, dir=ft2_folder_1)
+
+        self.assertEqual(basename_list, ['128_0_FT.ft2', '128_1_FT.ft2'])
+        self.assertEqual(file_root_list, ['128_0_FT', '128_1_FT'])
+
+
     def test_get_file_path_with_dir(self):
         """The modification of file paths by lib.io.get_file_path when a 
directory is supplied."""
 




Related Messages


Powered by MHonArc, Updated Wed Dec 03 18:40:02 2014