Skip to content

Commit

Permalink
fix error due to changed working directory
Browse files Browse the repository at this point in the history
  • Loading branch information
nf-core_bot committed Aug 23, 2022
1 parent 1214af5 commit 651c629
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/modules/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,15 @@ def test_modules_lint_patched_modules(self):
# Create a patch file
patch_obj = nf_core.modules.ModulePatch(self.pipeline_dir, GITLAB_URL, PATCH_BRANCH)
patch_obj.patch(BISMARK_ALIGN)
# change directory to the module directory

# change temporarily working directory to the pipeline directory
# to avoid error from try_apply_patch() during linting
wd_old = os.getcwd()
os.chdir(self.pipeline_dir)
module_lint = nf_core.modules.ModuleLint(dir=self.pipeline_dir, remote_url=GITLAB_URL)
module_lint.lint(print_results=False, all_modules=True)
os.chdir(wd_old)

assert len(module_lint.failed) == 0
assert len(module_lint.passed) > 0
assert len(module_lint.warned) >= 0

0 comments on commit 651c629

Please sign in to comment.