| Total Complexity | 0 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | #!/usr/bin/env python |
||
| 2 | |||
| 3 | import nose |
||
| 4 | import os |
||
| 5 | import shutil |
||
| 6 | import sys |
||
| 7 | import tempfile |
||
| 8 | |||
| 9 | if __name__ == "__main__": |
||
| 10 | os.environ['ELODIE_APPLICATION_DIRECTORY'] = tempfile.mkdtemp('-elodie-test') |
||
| 11 | os.environ['ELODIE_MAPQUEST_KEY'] = 'x8wQLqGhW7qK3sFpjYtVTogVtoMK0S8s' |
||
| 12 | print('Application Directory: {}'.format(os.environ['ELODIE_APPLICATION_DIRECTORY'])) |
||
| 13 | |||
| 14 | project_root = os.path.abspath(os.path.join(os.path.dirname( __file__ ), '..', '..')) |
||
| 15 | shutil.copy2( |
||
| 16 | '{}/config.ini-sample'.format(project_root), |
||
| 17 | '{}/config.ini'.format(os.environ['ELODIE_APPLICATION_DIRECTORY']) |
||
| 18 | ) |
||
| 19 | test_directory = os.path.dirname(os.path.abspath(__file__)) |
||
| 20 | test_argv = sys.argv |
||
| 21 | test_argv.append('--verbosity=2') |
||
| 22 | result = nose.run(argv=test_argv) |
||
| 23 | if(result): |
||
| 24 | sys.exit(0) |
||
| 25 | else: |
||
| 26 | sys.exit(1) |
||
| 27 |