Commit 53905628 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI

Configure tests

Similar to bob.bio.base!183
Some classes are picked up by test runners while they are not
UnitTest classes.
parent 7b23eb1c
Pipeline #38674 passed with stage
in 12 minutes and 47 seconds
......@@ -25,6 +25,10 @@ Base = declarative_base()
class TestFile (Base, bob.pad.base.database.PadFile):
# tell test runners (such as nose and pytest) that this class is not a test class
__test__ = False
__tablename__ = "file"
id = Column(Integer, primary_key=True)
client_id = Column(Integer, unique=True)
......@@ -49,6 +53,10 @@ def create_database():
class TestDatabase (bob.pad.base.database.PadDatabase, bob.db.base.SQLiteDatabase):
# tell test runners (such as nose and pytest) that this class is not a test class
__test__ = False
def __init__(self):
bob.pad.base.database.PadDatabase.__init__(self, 'pad_test', original_directory="original/directory", original_extension=".orig")
bob.db.base.SQLiteDatabase.__init__(self, dbfile, TestFile)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment