seriesmarker.test.database.base.persitent_db_test_case module

class AppDirsMock(user_data_dir, user_cache_dir)[source]

Bases: object

Emulates the appdirs package with custom directories.

__init__(user_data_dir, user_cache_dir)[source]

Sets the path to custom directories, which shall be returned by appdirs related method calls at runtime.

Parameters:
  • user_data_dir (string) – The path of the user data directory to return.
  • user_cache_dir (string) – The path of the user cache directory to return.
class PersistentDBTestCase(methodName='runTest')[source]

Bases: seriesmarker.test.database.base.db_test_case.DBTestCase

Prepares the execution of persistent test cases for deriving classes, i.e., data is stored at a temporary location on the hard disk and is available to multiple test cases.

classmethod deleteDatabase()[source]

Removes the temporary directory, created by setUpClass().

classmethod setUpClass()[source]

Modifies SeriesMarker’s database location to let it point at a temporary directory.

Overrides unittest.TestCase.setUpClass()

classmethod tearDownClass()[source]