コード例 #1
0
    def tearDown(self):
        self.engine.dispose()
        test_db_utils.remove_db()

        run_dir = Path.cwd()
        err_file = run_dir.joinpath("error.log")
        if err_file.exists():
            print("Found leftover blastclust file... removing")
            err_file.unlink()
コード例 #2
0
    def tearDown(self):
        shutil.rmtree(results_path)
        # Remove 'pdm_test_db'
        test_db_utils.remove_db()

        # Remove 'pdm_test_2'
        exists = test_db_utils.check_if_exists(db=DB2)
        if exists:
            test_db_utils.remove_db(db=DB2)
コード例 #3
0
    def tearDown(self):
        self.engine.dispose()
        # Remove 'pdm_test_db'
        exists = test_db_utils.check_if_exists()
        if exists:
            test_db_utils.remove_db()

        # Remove 'pdm_test_2'
        exists = test_db_utils.check_if_exists(db=DB2)
        if exists:
            test_db_utils.remove_db(db=DB2)
コード例 #4
0
 def tearDownClass(self):
     test_db_utils.remove_db()
コード例 #5
0
    def tearDown(self):
        if test_db_utils.check_if_exists(db=DB2):
            test_db_utils.remove_db(db=DB2)

        self.engine.dispose()
コード例 #6
0
    def tearDownClass(self):
        if test_db_utils.check_if_exists():
            test_db_utils.remove_db()

        if test_db_utils.check_if_exists(db=DB2):
            test_db_utils.remove_db(db=DB2)
コード例 #7
0
 def tearDown(self):
     self.engine.dispose()
     test_db_utils.remove_db()
     test_db_utils.remove_db(db=DB2)
コード例 #8
0
 def tearDownClass(self):
     # Remove 'pdm_test_db'
     test_db_utils.remove_db()
コード例 #9
0
ファイル: test_review.py プロジェクト: stjacqrm/pdm_utils
 def tearDownClass(self):
     test_db_utils.remove_db()
     shutil.rmtree(TEST_DIR)
コード例 #10
0
 def tearDown(self):
     shutil.rmtree(output_path)
     exists = test_db_utils.check_if_exists()
     if exists:
         test_db_utils.remove_db()
コード例 #11
0
# to utilize urllib3, these two test files could be removed, and the tests
# would only need to confirm the download request status attribute = 200.
DB2 = "pdm_test_db"

# Create the main test directory in which all files will be
# created and managed. Gets created once for all tests.
test_root_dir = Path("/tmp", "pdm_utils_tests_get_db")
if test_root_dir.exists() == True:
    shutil.rmtree(test_root_dir)
test_root_dir.mkdir()

# Since these tests involve creating new databases, be sure to
# remove the existing test database if it is already present.
exists = test_db_utils.check_if_exists()
if exists:
    test_db_utils.remove_db()

# Within main test folder, this new folder will be created/removed
# for each test. Within the output_folder, get_db will dynamically create
# a new folder, but only if files are downloaded.
output_path = Path(test_root_dir, "output")
results_path = Path(output_path, get_db.RESULTS_FOLDER)


def get_unparsed_args(db=DB,
                      option=None,
                      download=False,
                      output_folder=None,
                      version=False,
                      url=""):
    """Returns list of command line arguments to convert database."""
コード例 #12
0
 def tearDownClass(self):
     self.engine.dispose()
     test_db_utils.remove_db()
コード例 #13
0
 def tearDown(self):
     # Remove 'pdm_test_2'
     exists = test_db_utils.check_if_exists(db=DB2)
     if exists:
         test_db_utils.remove_db(db=DB2)
コード例 #14
0
ファイル: test_fileio.py プロジェクト: cdshaffer/pdm_utils
 def tearDownClass(self):
     test_db_utils.remove_db()
     shutil.rmtree(self.test_dir)
コード例 #15
0
 def tearDown(self):
     test_db_utils.remove_db()
     self.trans.rollback()
     self.engine.dispose()
コード例 #16
0
 def tearDown(self):
     test_db_utils.remove_db()
     self.engine.dispose()