def test_SCDB_gen_paths(): """Check that gen_paths method of SCDB.""" db = SCDB(auto_gen=False) db.gen_paths() assert db
def __init__(self): # Initialize from OMDB object SCDB.__init__(self, auto_gen=False) # Set up the base path to tests data self.project_path = pkg.resource_filename(__name__, 'data') self.gen_paths()
def test_SCDB_paths(): """Test that all defined SCDB paths exist.""" db = SCDB() # Loops through all paths, checking they exist # Skips vars without '_path' marker, and empty variables for key, val in vars(db).items(): if '_path' in key and val: assert os.path.exists(val)
def test_check_db(): """Test the check_db function.""" # Check that it returns an SCDB when given None db = check_db(None) assert isinstance(db, SCDB) # Check that it returns an SCDB object when given one db = SCDB() db = check_db(db) assert isinstance(db, SCDB)
def test_SCDB(): """Test the SCDB object.""" # Check that SCDB returns properly. assert SCDB(auto_gen=False)
def test_SCDB_gen_paths(): db = SCDB(auto_gen=False) db.gen_paths() assert db
def test_SCDB(): assert SCDB(auto_gen=False)