-
Notifications
You must be signed in to change notification settings - Fork 55
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
1 parent
7c579e9
commit 148fb7c
Showing
5 changed files
with
49 additions
and
10 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from _test_env import * | ||
from test import * | ||
from cli import * | ||
import unittest | ||
|
||
|
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,4 +1,4 @@ | ||
from _test_env import * | ||
from test import * | ||
from core import * | ||
from pmock import * | ||
import unittest | ||
|
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,4 +1,4 @@ | ||
from _test_env import * | ||
from test import * | ||
from mysql import * | ||
from pmock import * | ||
import os | ||
|
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,46 @@ | ||
import os | ||
import sys | ||
import unittest | ||
|
||
sys.path.insert(0, os.path.abspath(".")) | ||
sys.path.insert(0, os.path.abspath("./tests")) | ||
sys.path.insert(0, os.path.abspath("../")) | ||
sys.path.insert(0, os.path.abspath("../tests")) | ||
|
||
if __name__ == "__main__": | ||
from cli_test import * | ||
from core_test import * | ||
from mysql_test import * | ||
|
||
test_suites = [] | ||
|
||
# add all tests to the test suite | ||
# TODO: this could be done automatically | ||
test_suites.append(unittest.TestLoader().loadTestsFromTestCase(CLITest)) | ||
test_suites.append(unittest.TestLoader().loadTestsFromTestCase(SimpleDBMigrateTest)) | ||
test_suites.append(unittest.TestLoader().loadTestsFromTestCase(MySQLTest)) | ||
|
||
alltests = unittest.TestSuite(test_suites) | ||
|
||
result = unittest.TestResult() | ||
alltests.run(result) | ||
|
||
if result.wasSuccessful(): | ||
print "\nAll %d tests passed :)\n" % result.testsRun | ||
else: | ||
print "\nError in tests (%d runned, %d errors, %d failures)\n" % (result.testsRun, len(result.errors), len(result.failures)) | ||
|
||
for problems in [result.errors, result.failures]: | ||
for problem in problems: | ||
print "======================================================================" | ||
i = 0 | ||
for info in problem: | ||
if i == 1: | ||
print "----------------------------------------------------------------------" | ||
if i == 0: | ||
print "FAIL: %s" % info | ||
else: | ||
print info | ||
i += 1 | ||
print "----------------------------------------------------------------------" | ||
print "" |