mailr19065 - in /trunk: data_store/lib/ data_store/objects/ test_suite/unit_tests/_data_store/_lib/ test_suite/unit_tests/_data_...


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

Header


Content

Posted by edward on March 23, 2013 - 13:52:
Author: bugman
Date: Sat Mar 23 13:52:00 2013
New Revision: 19065

URL: http://svn.gna.org/viewcvs/relax?rev=19065&view=rev
Log:
Created two new empty packages data_store.lib and data_store.objects.

The data_store.lib package will be for functions and modules from generic_fns 
which manipulate the
data store objects, and the data_store.objects package will be for the 
special objects of the store.


Added:
    trunk/data_store/lib/
    trunk/data_store/lib/__init__.py
    trunk/data_store/objects/
    trunk/data_store/objects/__init__.py
    trunk/test_suite/unit_tests/_data_store/_lib/
    trunk/test_suite/unit_tests/_data_store/_lib/__init__.py
      - copied, changed from r19029, 
trunk/test_suite/unit_tests/_data_store/__init__.py
    trunk/test_suite/unit_tests/_data_store/_lib/test___init__.py
      - copied, changed from r19047, 
trunk/test_suite/unit_tests/_data_store/test___init__.py
    trunk/test_suite/unit_tests/_data_store/_objects/
    trunk/test_suite/unit_tests/_data_store/_objects/__init__.py
      - copied unchanged from r19029, 
trunk/test_suite/unit_tests/_data_store/__init__.py
    trunk/test_suite/unit_tests/_data_store/_objects/test___init__.py
      - copied, changed from r19047, 
trunk/test_suite/unit_tests/_data_store/test___init__.py

Added: trunk/data_store/lib/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/data_store/lib/__init__.py?rev=19065&view=auto
==============================================================================
--- trunk/data_store/lib/__init__.py (added)
+++ trunk/data_store/lib/__init__.py Sat Mar 23 13:52:00 2013
@@ -1,0 +1,26 @@
+###############################################################################
+#                                                                            
 #
+# Copyright (C) 2013 Edward d'Auvergne                                       
 #
+#                                                                            
 #
+# This file is part of the program relax (http://www.nmr-relax.com).         
 #
+#                                                                            
 #
+# This program is free software: you can redistribute it and/or modify       
 #
+# it under the terms of the GNU General Public License as published by       
 #
+# the Free Software Foundation, either version 3 of the License, or          
 #
+# (at your option) any later version.                                        
 #
+#                                                                            
 #
+# This program 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 General Public License for more details.                               
 #
+#                                                                            
 #
+# You should have received a copy of the GNU General Public License          
 #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.      
 #
+#                                                                            
 #
+###############################################################################
+
+# Module docstring.
+"""Package for manipulating the relax data storage object."""
+
+__all__ = [
+]

Added: trunk/data_store/objects/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/data_store/objects/__init__.py?rev=19065&view=auto
==============================================================================
--- trunk/data_store/objects/__init__.py (added)
+++ trunk/data_store/objects/__init__.py Sat Mar 23 13:52:00 2013
@@ -1,0 +1,26 @@
+###############################################################################
+#                                                                            
 #
+# Copyright (C) 2013 Edward d'Auvergne                                       
 #
+#                                                                            
 #
+# This file is part of the program relax (http://www.nmr-relax.com).         
 #
+#                                                                            
 #
+# This program is free software: you can redistribute it and/or modify       
 #
+# it under the terms of the GNU General Public License as published by       
 #
+# the Free Software Foundation, either version 3 of the License, or          
 #
+# (at your option) any later version.                                        
 #
+#                                                                            
 #
+# This program 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 General Public License for more details.                               
 #
+#                                                                            
 #
+# You should have received a copy of the GNU General Public License          
 #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.      
 #
+#                                                                            
 #
+###############################################################################
+
+# Module docstring.
+"""Package of objects making up the relax data storage object."""
+
+__all__ = [
+]

Copied: trunk/test_suite/unit_tests/_data_store/_lib/__init__.py (from 
r19029, trunk/test_suite/unit_tests/_data_store/__init__.py)
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_data_store/_lib/__init__.py?p2=trunk/test_suite/unit_tests/_data_store/_lib/__init__.py&p1=trunk/test_suite/unit_tests/_data_store/__init__.py&r1=19029&r2=19065&rev=19065&view=diff
==============================================================================
--- trunk/test_suite/unit_tests/_data_store/__init__.py (original)
+++ trunk/test_suite/unit_tests/_data_store/_lib/__init__.py Sat Mar 23 
13:52:00 2013
@@ -19,6 +19,6 @@
 #                                                                            
 #
 
###############################################################################
 
-__all__ = ['test___init__',
-           'test_diff_tensor',
-           'test_mol_res_spin']
+__all__ = [
+    'test___init__'
+]

Copied: trunk/test_suite/unit_tests/_data_store/_lib/test___init__.py (from 
r19047, trunk/test_suite/unit_tests/_data_store/test___init__.py)
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_data_store/_lib/test___init__.py?p2=trunk/test_suite/unit_tests/_data_store/_lib/test___init__.py&p1=trunk/test_suite/unit_tests/_data_store/test___init__.py&r1=19047&r2=19065&rev=19065&view=diff
==============================================================================
--- trunk/test_suite/unit_tests/_data_store/test___init__.py (original)
+++ trunk/test_suite/unit_tests/_data_store/_lib/test___init__.py Sat Mar 23 
13:52:00 2013
@@ -24,70 +24,18 @@
 import sys
 
 # relax module imports.
-import data_store
-from data_store import Relax_data_store; ds = Relax_data_store()
+import data_store.lib
 from test_suite.unit_tests.package_checking import PackageTestCase
 
 
-class Empty_container:
-    """An empty data container."""
-
 
 class Test___init__(PackageTestCase):
-    """Unit tests for the data_store package."""
+    """Unit tests for the data_store.lib package."""
 
     def setUp(self):
-        """Set up a complex relax data store."""
+        """Set up for the package checking."""
 
         # Package info.
-        self.package = data_store
-        self.package_name = 'data_store'
-        self.package_path = sys.path[0] + sep + 'data_store'
-        
-        # Add an empty data container as a new pipe.
-        ds['empty'] = Empty_container()
-
-        # Add an object to the empty data container.
-        ds['empty'].x = 1
-
-        # Add an object to the data store object.
-        ds.test = 1
-
-
-    def test_add(self):
-        """Unit test for testing the addition of a new data pipe by the 
'add()' method."""
-
-        # Add a new data pipe.
-        ds.add(pipe_name='new', pipe_type='mf')
-
-        # Test that the new data pipe exists.
-        self.assert_('new' in ds)
-
-
-    def test_repr(self):
-        """Unit test for the validity of the __repr__() method."""
-
-        # Test that __repr__() returns a string.
-        self.assert_(type(ds.__repr__()), str)
-
-
-    def test_reset(self):
-        """Unit test for the __reset__() class method."""
-
-        # Execute the reset method.
-        ds.__reset__()
-
-        # Test that there are no keys.
-        self.assertEqual(list(ds.keys()), [])
-
-        # Test that the object ds.test is deleted.
-        self.assert_(not hasattr(ds, 'test'))
-
-        # Test that the object methods still exist.
-        self.assert_(hasattr(ds, '__new__'))
-        self.assert_(hasattr(ds, '__repr__'))
-        self.assert_(hasattr(ds, '__reset__'))
-        self.assert_(hasattr(ds, 'add'))
-
-        # Test that the object's initial objects still exist.
-        self.assert_(hasattr(ds, 'current_pipe'))
+        self.package = data_store.lib
+        self.package_name = 'data_store.lib'
+        self.package_path = sys.path[0] + sep + 'data_store.lib'

Copied: trunk/test_suite/unit_tests/_data_store/_objects/test___init__.py 
(from r19047, trunk/test_suite/unit_tests/_data_store/test___init__.py)
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_data_store/_objects/test___init__.py?p2=trunk/test_suite/unit_tests/_data_store/_objects/test___init__.py&p1=trunk/test_suite/unit_tests/_data_store/test___init__.py&r1=19047&r2=19065&rev=19065&view=diff
==============================================================================
--- trunk/test_suite/unit_tests/_data_store/test___init__.py (original)
+++ trunk/test_suite/unit_tests/_data_store/_objects/test___init__.py Sat Mar 
23 13:52:00 2013
@@ -24,70 +24,18 @@
 import sys
 
 # relax module imports.
-import data_store
-from data_store import Relax_data_store; ds = Relax_data_store()
+import data_store.objects
 from test_suite.unit_tests.package_checking import PackageTestCase
 
 
-class Empty_container:
-    """An empty data container."""
-
 
 class Test___init__(PackageTestCase):
-    """Unit tests for the data_store package."""
+    """Unit tests for the data_store.objects package."""
 
     def setUp(self):
-        """Set up a complex relax data store."""
+        """Set up for the package checking."""
 
         # Package info.
-        self.package = data_store
-        self.package_name = 'data_store'
-        self.package_path = sys.path[0] + sep + 'data_store'
-        
-        # Add an empty data container as a new pipe.
-        ds['empty'] = Empty_container()
-
-        # Add an object to the empty data container.
-        ds['empty'].x = 1
-
-        # Add an object to the data store object.
-        ds.test = 1
-
-
-    def test_add(self):
-        """Unit test for testing the addition of a new data pipe by the 
'add()' method."""
-
-        # Add a new data pipe.
-        ds.add(pipe_name='new', pipe_type='mf')
-
-        # Test that the new data pipe exists.
-        self.assert_('new' in ds)
-
-
-    def test_repr(self):
-        """Unit test for the validity of the __repr__() method."""
-
-        # Test that __repr__() returns a string.
-        self.assert_(type(ds.__repr__()), str)
-
-
-    def test_reset(self):
-        """Unit test for the __reset__() class method."""
-
-        # Execute the reset method.
-        ds.__reset__()
-
-        # Test that there are no keys.
-        self.assertEqual(list(ds.keys()), [])
-
-        # Test that the object ds.test is deleted.
-        self.assert_(not hasattr(ds, 'test'))
-
-        # Test that the object methods still exist.
-        self.assert_(hasattr(ds, '__new__'))
-        self.assert_(hasattr(ds, '__repr__'))
-        self.assert_(hasattr(ds, '__reset__'))
-        self.assert_(hasattr(ds, 'add'))
-
-        # Test that the object's initial objects still exist.
-        self.assert_(hasattr(ds, 'current_pipe'))
+        self.package = data_store.objects
+        self.package_name = 'data_store.objects'
+        self.package_path = sys.path[0] + sep + 'data_store.objects'




Related Messages


Powered by MHonArc, Updated Sat Mar 23 14:20:02 2013