Skip to content

Commit

Permalink
Fix config test
Browse files Browse the repository at this point in the history
  • Loading branch information
rmFlynn committed Jan 7, 2023
1 parent 076fcc4 commit c97cf0f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
1 change: 1 addition & 0 deletions mag_annotator/CONFIG
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@
},
"description_db": null,
"dram_version": null
}
4 changes: 2 additions & 2 deletions mag_annotator/summarize_vgfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ def look_up_metabolic_info(search_db, match_db, match_db_name):
.assign(gene_id_origin=match_db_name))

amg_database_frame = (amg_database
.melt(value_vars=['KO', 'EC', 'PFAM'],
id_vars=['gene', 'module', 'metabolism',
.melt(value_vars=['KO', 'EC', 'PFAM'],
id_vars=['gene', 'module', 'metabolism',
'reference', 'verified'],
value_name='gene_id')
.drop('variable', axis=1)
Expand Down
11 changes: 3 additions & 8 deletions tests/test_config_cleen.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,8 @@
from mag_annotator.utils import setup_logger


@pytest.fixture()
def logger(tmpdir):
logger = logging.getLogger('test_log')
setup_logger(logger)
return logger


def db_w_entries(logger):
def test_clean_config():
empty_config = {
"search_databases": {
"kegg": None,
Expand Down Expand Up @@ -47,5 +41,6 @@ def db_w_entries(logger):
"description_db": None,
"dram_version": None
}
db_handler = DatabaseHandler(logger, path.join('tests', 'data', 'test_CONFIG'))
logger = logging.getLogger('test_log')
db_handler = DatabaseHandler(logger)
assert db_handler.config == empty_config

0 comments on commit c97cf0f

Please sign in to comment.