- Timestamp:
- Apr 5, 2017 1:15:25 PM (8 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- fd5d6eac
- Parents:
- 4fb10e5 (diff), 5e2f36c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Location:
- test
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
test/logging.ini
rebb0a55 raaad4c95 29 29 level=INFO 30 30 formatter=detailed 31 args=( os.path.join(os.path.expanduser("~"),'.sasview/tests.log'),"w")31 args=('tests.log','w') 32 32 33 33 ############################################################################### -
test/run_one.py
r64ca561 raaad4c95 15 15 logging.config.fileConfig(LOGGER_CONFIG_FILE, disable_existing_loggers=False) 16 16 17 if len(sys.argv) < 2: 18 logger.error("Use %s <filename to test>",sys.argv[0]) 19 sys.exit(-1) 17 20 18 21 run_py = joinpath(dirname(dirname(abspath(__file__))), 'run.py') -
test/sasdataloader/test/testLoad.py
r463e7ffc raaad4c95 19 19 HAS_IMAGE = True 20 20 except: 21 print "IMAGE TESTS WILL NOT BE PERFORMED: MISSING PIL MODULE"21 logger.info("IMAGE TESTS WILL NOT BE PERFORMED: MISSING PIL MODULE") 22 22 23 23 import os.path -
test/utest_sasview.py
rebb0a55 raaad4c95 8 8 import logging.config 9 9 LOGGER_CONFIG_FILE = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'logging.ini') 10 print LOGGER_CONFIG_FILE11 10 logging.config.fileConfig(LOGGER_CONFIG_FILE) 12 11 logger = logging.getLogger(__name__) … … 50 49 continue 51 50 51 52 52 # Go through modules looking for unit tests 53 53 module_dir = os.path.join(test_root, d, "test") -
test/sasdataloader/test/utest_averaging.py
r9a5097c r4fb10e5 2 2 import unittest 3 3 import math 4 import os 4 5 5 6 from sas.sascalc.dataloader.loader import Loader … … 97 98 98 99 def setUp(self): 99 self.data = Loader().load('MAR07232_rest.ASC') 100 filepath = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'MAR07232_rest.ASC') 101 self.data = Loader().load(filepath) 100 102 101 103 def test_ring(self): … … 110 112 111 113 o = r(self.data) 112 answer = Loader().load('ring_testdata.txt') 114 filepath = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'ring_testdata.txt') 115 answer = Loader().load(filepath) 113 116 114 117 for i in range(r.nbins_phi - 1): … … 128 131 o = r(self.data) 129 132 130 answer = Loader().load('avg_testdata.txt') 133 filepath = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'avg_testdata.txt') 134 answer = Loader().load(filepath) 131 135 for i in range(r.nbins_phi): 132 136 self.assertAlmostEqual(o.x[i], answer.x[i], 4) … … 163 167 o = r(self.data) 164 168 165 answer = Loader().load('slabx_testdata.txt') 169 filepath = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'slabx_testdata.txt') 170 answer = Loader().load(filepath) 166 171 for i in range(len(o.x)): 167 172 self.assertAlmostEqual(o.x[i], answer.x[i], 4) … … 180 185 o = r(self.data) 181 186 182 answer = Loader().load('slaby_testdata.txt') 187 filepath = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'slaby_testdata.txt') 188 answer = Loader().load(filepath) 183 189 for i in range(len(o.x)): 184 190 self.assertAlmostEqual(o.x[i], answer.x[i], 4) … … 207 213 o = r(self.data) 208 214 209 answer = Loader().load('ring_testdata.txt') 215 filepath = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'ring_testdata.txt') 216 answer = Loader().load(filepath) 210 217 for i in range(len(o.x)): 211 218 self.assertAlmostEqual(o.x[i], answer.x[i], 4) … … 225 232 o = r(self.data) 226 233 227 answer = Loader().load('sectorphi_testdata.txt') 234 filepath = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'sectorphi_testdata.txt') 235 answer = Loader().load(filepath) 228 236 for i in range(len(o.x)): 229 237 self.assertAlmostEqual(o.x[i], answer.x[i], 4) … … 243 251 o = r(self.data) 244 252 245 answer = Loader().load('sectorq_testdata.txt') 253 filepath = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'sectorq_testdata.txt') 254 answer = Loader().load(filepath) 246 255 for i in range(len(o.x)): 247 256 self.assertAlmostEqual(o.x[i], answer.x[i], 4)
Note: See TracChangeset
for help on using the changeset viewer.