-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
155 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,33 @@ | ||
# Licensed under a 3-clause BSD style license - see LICENSE.rst | ||
# -*- coding: utf-8 -*- | ||
from __future__ import absolute_import | ||
""" | ||
hpsspy.test | ||
~~~~~~~~~~~ | ||
Used to initialize the unit test framework via ``python setup.py test``. | ||
""" | ||
from __future__ import (absolute_import, division, | ||
print_function, unicode_literals) | ||
# The line above will help with 2to3 support. | ||
import unittest | ||
|
||
|
||
def hpsspy_test_suite(): | ||
"""Returns unittest.TestSuite of hpsspy tests. | ||
This is factored out separately from runtests() so that it can be used by | ||
``python setup.py test``. | ||
""" | ||
from os.path import dirname | ||
py_dir = dirname(dirname(__file__)) | ||
return unittest.defaultTestLoader.discover(py_dir, | ||
top_level_dir=dirname(py_dir)) | ||
|
||
|
||
def runtests(): | ||
"""Run all tests in hpsspy.test.test_*. | ||
""" | ||
# Load all TestCase classes from hpsspy/test/test_*.py | ||
tests = hpsspy_test_suite() | ||
# Run them | ||
unittest.TextTestRunner(verbosity=2).run(tests) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters