Skip to content

Commit

Permalink
fix test_cli
Browse files Browse the repository at this point in the history
  • Loading branch information
mashehu committed Oct 24, 2024
1 parent 6d3a306 commit 5099313
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions nf_core/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ def command_pipelines_schema_lint(directory, schema_file):
"""
Check that a given pipeline schema is valid.
"""
pipelines_schema_lint(directory / schema_file)
pipelines_schema_lint(Path(directory, schema_file))


# nf-core pipelines schema docs
Expand Down Expand Up @@ -818,7 +818,7 @@ def command_pipelines_schema_docs(directory, schema_file, output, format, force,
"""
Outputs parameter documentation for a pipeline schema.
"""
pipelines_schema_docs(directory / schema_file, output, format, force, columns)
pipelines_schema_docs(Path(directory, schema_file), output, format, force, columns)


# nf-core modules subcommands
Expand Down
4 changes: 2 additions & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def test_schema_lint(self, mock_get_schema_path):
with open("nextflow_schema.json", "w") as f:
f.write("{}")
self.invoke_cli(cmd)
mock_get_schema_path.assert_called_with("nextflow_schema.json")
mock_get_schema_path.assert_called_with(Path("nextflow_schema.json"))

@mock.patch("nf_core.pipelines.schema.PipelineSchema.get_schema_path")
def test_schema_lint_filename(self, mock_get_schema_path):
Expand All @@ -368,7 +368,7 @@ def test_schema_lint_filename(self, mock_get_schema_path):
with open("some_other_filename", "w") as f:
f.write("{}")
self.invoke_cli(cmd)
mock_get_schema_path.assert_called_with("some_other_filename")
mock_get_schema_path.assert_called_with(Path("some_other_filename"))

@mock.patch("nf_core.pipelines.create_logo.create_logo")
def test_create_logo(self, mock_create_logo):
Expand Down

0 comments on commit 5099313

Please sign in to comment.