Trees | Indices | Help |
|
---|
|
1 ############################################################################### 2 # # 3 # Copyright (C) 2008, 2010 Edward d'Auvergne # 4 # # 5 # This file is part of the program relax. # 6 # # 7 # relax 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 2 of the License, or # 10 # (at your option) any later version. # 11 # # 12 # relax 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 relax; if not, write to the Free Software # 19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # 20 # # 21 ############################################################################### 22 23 # Python module imports. 24 from unittest import TestCase 25 26 # relax module imports. 27 from prompt.dasha import Dasha 28 from relax_errors import RelaxBoolError, RelaxNoneStrError, RelaxStrError 29 30 # Unit test imports. 31 from data_types import DATA_TYPES 32 3335 """Unit tests for the functions of the 'prompt.dasha' module.""" 36 37 # Instantiate the user function class. 38 dasha_fns = Dasha() 39 4013042 """Failure of the algor arg of the dasha.create() user function.""" 43 44 # Loop over the data types. 45 for data in DATA_TYPES: 46 # Catch the str argument, and skip it. 47 if data[0] == 'str': 48 continue 49 50 # The argument test. 51 self.assertRaises(RelaxStrError, self.dasha_fns.create, algor=data[1])52 5355 """Failure of the dir arg of the dasha.create() user function.""" 56 57 # Loop over the data types. 58 for data in DATA_TYPES: 59 # Catch the None and str arguments, and skip them. 60 if data[0] == 'None' or data[0] == 'str': 61 continue 62 63 # The argument test. 64 self.assertRaises(RelaxNoneStrError, self.dasha_fns.create, dir=data[1])65 6668 """The force arg test of the dasha.create() user function.""" 69 70 # Loop over the data types. 71 for data in DATA_TYPES: 72 # Catch the bool arguments, and skip them. 73 if data[0] == 'bool': 74 continue 75 76 # The argument test. 77 self.assertRaises(RelaxBoolError, self.dasha_fns.create, force=data[1])78 7981 """Failure of the dir arg of the dasha.execute() user function.""" 82 83 # Loop over the data types. 84 for data in DATA_TYPES: 85 # Catch the None and str arguments, and skip them. 86 if data[0] == 'None' or data[0] == 'str': 87 continue 88 89 # The argument test. 90 self.assertRaises(RelaxNoneStrError, self.dasha_fns.execute, dir=data[1])91 9294 """The force arg test of the dasha.execute() user function.""" 95 96 # Loop over the data types. 97 for data in DATA_TYPES: 98 # Catch the bool arguments, and skip them. 99 if data[0] == 'bool': 100 continue 101 102 # The argument test. 103 self.assertRaises(RelaxBoolError, self.dasha_fns.execute, force=data[1])104 105107 """Failure of the binary arg of the dasha.execute() user function.""" 108 109 # Loop over the data types. 110 for data in DATA_TYPES: 111 # Catch the str argument, and skip it. 112 if data[0] == 'str': 113 continue 114 115 # The argument test. 116 self.assertRaises(RelaxStrError, self.dasha_fns.execute, binary=data[1])117 118120 """Failure of the dir arg of the dasha.extract() user function.""" 121 122 # Loop over the data types. 123 for data in DATA_TYPES: 124 # Catch the None and str arguments, and skip them. 125 if data[0] == 'None' or data[0] == 'str': 126 continue 127 128 # The argument test. 129 self.assertRaises(RelaxNoneStrError, self.dasha_fns.extract, dir=data[1])
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Apr 10 13:32:34 2013 | http://epydoc.sourceforge.net |