X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=tests%2F__init__.py;h=e55661f9673427fac81535862bee5987575a2d24;hb=8f977b9eeedb62ab6b2a8eb790b4977a14f7acbb;hp=c624381b6ad0e053f6cf370b1ea16d3b67df18dc;hpb=73bc43ecf69a473464909ef1b4d2236c60fcb1bb;p=m_librarian.git diff --git a/tests/__init__.py b/tests/__init__.py index c624381..e55661f 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,10 +1,10 @@ -__all__ = ['TestCase', 'main'] - - import os import unittest from m_librarian.db import open_db, init_db +from m_librarian.inp import import_inpx + +__all__ = ['TestCase', 'main'] class TestCase(unittest.TestCase): @@ -22,11 +22,14 @@ class TestCase(unittest.TestCase): except OSError: pass + def import_inpx(self, inpx): + import_inpx(os.path.join(os.path.dirname(__file__), inpx)) + def main(): try: unittest.main(testRunner=unittest.TextTestRunner()) - except SystemExit, msg: + except SystemExit as msg: result = msg.args[0] else: result = 0