ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.2.2ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change
on this file since f2940c4 was
463e7ffc,
checked in by Ricardo Ferraz Leal <ricleal@…>, 7 years ago
|
getLogger with module name
|
-
Property mode set to
100644
|
File size:
864 bytes
|
Rev | Line | |
---|
[6fe5100] | 1 | #!/usr/bin/env python |
---|
| 2 | |
---|
| 3 | import os |
---|
| 4 | import sys |
---|
| 5 | import xmlrunner |
---|
| 6 | import unittest |
---|
| 7 | import imp |
---|
| 8 | from os.path import abspath, dirname, split as splitpath, join as joinpath |
---|
| 9 | |
---|
[c155a16] | 10 | import logging |
---|
| 11 | import logging.config |
---|
| 12 | LOGGER_CONFIG_FILE = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'logging.ini') |
---|
| 13 | logging.config.fileConfig(LOGGER_CONFIG_FILE, disable_existing_loggers=False) |
---|
[463e7ffc] | 14 | logger = logging.getLogger(__name__) |
---|
[c155a16] | 15 | |
---|
[6fe5100] | 16 | run_py = joinpath(dirname(dirname(abspath(__file__))), 'run.py') |
---|
| 17 | run = imp.load_source('sasview_run', run_py) |
---|
| 18 | run.prepare() |
---|
| 19 | #print "\n".join(sys.path) |
---|
[76f132a] | 20 | test_path,test_file = splitpath(abspath(sys.argv[1])) |
---|
[6fe5100] | 21 | print "=== testing:",sys.argv[1] |
---|
| 22 | #print test_path, test_file |
---|
| 23 | sys.argv = [sys.argv[0]] |
---|
| 24 | os.chdir(test_path) |
---|
| 25 | sys.path.insert(0, test_path) |
---|
| 26 | test = imp.load_source('tests',test_file) |
---|
| 27 | unittest.main(test, testRunner=xmlrunner.XMLTestRunner(output='logs')) |
---|
Note: See
TracBrowser
for help on using the repository browser.