Package test_suite :: Package unit_tests :: Module base_classes
[hide private]
[frames] | no frames]

Source Code for Module test_suite.unit_tests.base_classes

 1  ############################################################################### 
 2  #                                                                             # 
 3  # Copyright (C) 2010-2013 Edward d'Auvergne                                   # 
 4  #                                                                             # 
 5  # This file is part of the program relax (http://www.nmr-relax.com).          # 
 6  #                                                                             # 
 7  # This program is free software: you can redistribute it and/or modify        # 
 8  # it under the terms of the GNU General Public License as published by        # 
 9  # the Free Software Foundation, either version 3 of the License, or           # 
10  # (at your option) any later version.                                         # 
11  #                                                                             # 
12  # This program is distributed in the hope that it will be useful,             # 
13  # but WITHOUT ANY WARRANTY; without even the implied warranty of              # 
14  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               # 
15  # GNU General Public License for more details.                                # 
16  #                                                                             # 
17  # You should have received a copy of the GNU General Public License           # 
18  # along with this program.  If not, see <http://www.gnu.org/licenses/>.       # 
19  #                                                                             # 
20  ############################################################################### 
21   
22  # Module docstring. 
23  """Base classes for the system tests.""" 
24   
25  # Python module imports. 
26  from unittest import TestCase 
27   
28  # relax module imports. 
29  from data_store import Relax_data_store; ds = Relax_data_store() 
30  from pipe_control.reset import reset 
31  from test_suite.clean_up import deletion 
32   
33   
34 -class UnitTestCase(TestCase):
35 """relax test case class specific for the unit tests.""" 36
37 - def tearDown(self):
38 """Default tearDown operation - delete temp directories and files and reset relax.""" 39 40 # Remove the temporary directory and variable. 41 deletion(obj=ds, name='tmpdir', dir=True) 42 deletion(obj=self, name='tmpdir', dir=True) 43 44 # Remove temporary file and variable. 45 deletion(obj=ds, name='tmpfile', dir=False) 46 deletion(obj=self, name='tmpfile', dir=False) 47 48 # Reset relax. 49 reset()
50