Skip to content

Commit

Permalink
TEST: revert imports and fix test_small_good_hits
Browse files Browse the repository at this point in the history
  • Loading branch information
Keegan-Evans committed Mar 6, 2023
1 parent 29afd5d commit ae7216a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
10 changes: 5 additions & 5 deletions q2_moshpit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
# The full license is in the file LICENSE, distributed with this software.
# ----------------------------------------------------------------------------

from .kraken2 import classification, database
from .metabat2 import metabat2
from . import diamond, annotation


import importlib
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions

importlib.import_module('q2_moshpit.kraken2')
importlib.import_module('q2_moshpit.metabat2')
importlib.import_module('q2_moshpit.diamond')
importlib.import_module('q2_moshpit.annotation')
__all__ = ['metabat2', 'classification', 'database', 'diamond', 'annotation']
11 changes: 5 additions & 6 deletions q2_moshpit/annotation/tests/test_annotate.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from q2_types_genomics.genome_data import SeedOrthologDirFmt, OrthologFileFmt
from q2_types_genomics.reference_db import EggnogRefDirFmt
import pandas as pd

import pandas.testing as pdt

class TestAnnotate(TestPluginBase):
package = 'q2_moshpit.annotation.tests'
Expand All @@ -28,10 +28,9 @@ def test_small_good_hits(self):
eggnog_db=egg_db)

exp_fp = self.get_data_path('expected/test_output.emapper.annotations')
exp = OrthologFileFmt(exp_fp, mode='r').view(pd.DataFrame).values
exp = OrthologFileFmt(exp_fp, mode='r').view(pd.DataFrame)

for rel_path, obj in obs_obj.annotations.iter_views(OrthologFileFmt):
obs = obj.view(pd.DataFrame).values

self.assertEqual(obs, exp)
assert False
obs = obj.view(pd.DataFrame)
pdt.assert_frame_equal(obs, exp)

0 comments on commit ae7216a

Please sign in to comment.