Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed setup.py to support the test command. You can now run tests via
python setup.py test Defined test suite in piwikapi/tests/__init__.py
- Loading branch information
Showing
2 changed files
with
53 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import unittest | ||
import doctest | ||
import sys | ||
|
||
|
||
|
||
def all_tests_suite(): | ||
suite = unittest.TestLoader().loadTestsFromNames([ | ||
'piwikapi.tests.analytics', | ||
'piwikapi.tests.ecommerce', | ||
'piwikapi.tests.goals', | ||
'piwikapi.tests.request', | ||
'piwikapi.tests.tracking', | ||
]) | ||
return suite | ||
|
||
def main(): | ||
runner = unittest.TextTestRunner(verbosity=1 + sys.argv.count('-v')) | ||
suite = all_tests_suite() | ||
raise SystemExit(not runner.run(suite).wasSuccessful()) | ||
|
||
|
||
if __name__ == '__main__': | ||
import os | ||
import sys | ||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) | ||
main() |
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