示例#1
0
    def setUp(self):
        options = build_config(self.get_args(), isolated=True, modules=get_all_modules())
        self.old_config = get_config().__dict__
        self.options = update_config(options)

        assert clusterblast.check_prereqs(self.options) == []
        assert clusterblast.check_options(self.options) == []
        assert clusterblast.is_enabled(self.options)
示例#2
0
    def test_mounted_at_runtime(self, _mocked_prep_known):
        options = config.update_config({
            "database_dir": "/mounted_at_runtime",
            "executables": {
                "diamond": "/some/path"
            },
        })
        error = RuntimeError(
            "check_clusterblast_files called when it shouldn't have been")
        with patch.object(clusterblast,
                          "check_clusterblast_files",
                          side_effect=error):
            clusterblast.check_prereqs(options)

        options = config.update_config({"database_dir": "/path"})
        with patch.object(clusterblast, "check_clusterblast_files",
                          returns=[]) as check:
            clusterblast.check_prereqs(options)
            check.assert_called_once()