def test_htseq_is_installed_in_resource(self): orig_path = os.environ['PATH'] os.environ['PATH'] = "" faux_htseq_count = tempfile.NamedTemporaryFile() os.chmod(faux_htseq_count.name, stat.S_IEXEC) config = {"config": {"resources": {"htseq-count": {"cmd": faux_htseq_count.name}}}} is_installed = count._htseq_is_installed(config) os.environ['PATH'] = orig_path self.assertTrue(is_installed)
def test_htseq_is_installed_in_path(self): self.assertTrue(count._htseq_is_installed({"config": {}}))