示例#1
0
    def test_check_prereqs(self):
        "Test fullhmmer.check_prereqs()"
        expected = []
        returned = cluster_hmmer.check_prereqs(self.config)

        self.assertListEqual(expected, returned)
        assert_same_trace(self.tracer, self.expected_trace)
示例#2
0
    def test_check_prereqs_missing_exe(self):
        "Test fullhmmer.check_prereqs() with a missing executable"
        self.config.executables.__dict__.pop("hmmscan")
        expected = ["Failed to locate executable: 'hmmscan'"]
        returned = cluster_hmmer.check_prereqs(self.config)

        self.assertListEqual(expected, returned)
        assert_same_trace(self.tracer, self.expected_trace)
示例#3
0
    def test_check_prereqs_missing_exe(self):
        "Test fullhmmer.check_prereqs() with a missing executable"
        path.locate_executable.mock_returns = None
        expected = ["Failed to locate executable: 'hmmscan'"]
        returned = cluster_hmmer.check_prereqs()

        self.assertListEqual(expected, returned)
        assert_same_trace(self.tracer, self.expected_trace)
示例#4
0
    def test_check_prereqs_missing_file(self, patched_locate, _patched_run):
        patched_locate.side_effect = [None] + EXPECTED_FILES[1:]
        expected = [
            "Failed to locate file: 'Pfam-A.hmm' in %s/pfam/%s" %
            (self.config.database_dir, self.latest_pfam)
        ]
        returned = cluster_hmmer.check_prereqs(self.config)

        self.assertListEqual(expected, returned)
示例#5
0
    def test_check_prereqs_missing_file(self):
        "Test fullhmmer.check_prereqs() with a missing file"
        self.file_list[0] = None
        path.locate_file.mock_returns_iter = self.file_list
        expected = [
            "Failed to locate file: 'Pfam-A.hmm' in %s/pfam/%s" %
            (self.config.database_dir, self.latest_pfam)
        ]
        returned = cluster_hmmer.check_prereqs(self.config)

        self.assertListEqual(expected, returned)
        assert_same_trace(self.tracer, self.expected_trace)
示例#6
0
    def test_check_prereqs_missing_exe(self, _patched_locate, _patched_run):
        self.config.executables.__dict__.pop("hmmscan")
        expected = ["Failed to locate executable: 'hmmscan'"]
        returned = cluster_hmmer.check_prereqs(self.config)

        self.assertListEqual(expected, returned)
示例#7
0
    def test_check_prereqs(self, _patched_locate, _patched_run):
        expected = []
        returned = cluster_hmmer.check_prereqs(self.config)

        self.assertListEqual(expected, returned)