Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 23, 2024
1 parent af9b573 commit be94bee
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 28 deletions.
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,6 @@ def invoke(self, *args, **kwargs):
return super().invoke(*args, **kwargs)


@pytest.fixture()
@pytest.fixture
def runner():
return CustomCliRunner()
3 changes: 2 additions & 1 deletion tests/test_collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
from contextlib import ExitStack as does_not_raise # noqa: N813

import pytest

from pytask_latex.collect import latex


@pytest.mark.unit()
@pytest.mark.unit
@pytest.mark.parametrize(
("kwargs", "expectation", "expected"),
[
Expand Down
2 changes: 1 addition & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pytask import build


@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_marker_is_configured(tmp_path):
session = build(paths=tmp_path)
assert "latex" in session.config["markers"]
40 changes: 20 additions & 20 deletions tests/test_execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
from pytask import Task
from pytask import build
from pytask import cli
from pytask_latex.execute import pytask_execute_task_setup

from pytask_latex.execute import pytask_execute_task_setup
from tests.conftest import TEST_RESOURCES
from tests.conftest import needs_latexmk
from tests.conftest import skip_on_github_actions_with_win


@pytest.mark.unit()
@pytest.mark.unit
def test_pytask_execute_task_setup(monkeypatch):
"""Make sure that the task setup raises errors."""
# Act like latexmk is installed since we do not test this.
Expand All @@ -33,7 +33,7 @@ def test_pytask_execute_task_setup(monkeypatch):

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_compile_latex_document(runner, tmp_path):
"""Test simple compilation."""
task_source = """
Expand All @@ -59,7 +59,7 @@ def task_compile_document():

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_compile_latex_document_w_relative(runner, tmp_path):
"""Test simple compilation."""
task_source = f"""
Expand Down Expand Up @@ -91,7 +91,7 @@ def task_compile_document():

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_compile_latex_document_to_different_name(runner, tmp_path):
"""Compile a LaTeX document where source and output name differ."""
task_source = """
Expand All @@ -118,7 +118,7 @@ def task_compile_document():

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_compile_w_bibliography(runner, tmp_path):
"""Compile a LaTeX document with bibliography."""
task_source = """
Expand Down Expand Up @@ -158,7 +158,7 @@ def task_compile_document():

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_raise_error_if_latexmk_is_not_found(tmp_path, monkeypatch):
task_source = """
from pytask import mark
Expand Down Expand Up @@ -192,7 +192,7 @@ def task_compile_document():

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_compile_latex_document_w_xelatex(runner, tmp_path):
task_source = """
from pytask import mark
Expand Down Expand Up @@ -227,7 +227,7 @@ def task_compile_document():

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_compile_latex_document_w_two_dependencies(runner, tmp_path):
task_source = """
from pytask import mark
Expand Down Expand Up @@ -255,7 +255,7 @@ def task_compile_document(path: Path = Path("in.txt")):

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_fail_because_script_is_not_latex(tmp_path):
task_source = """
from pytask import mark
Expand Down Expand Up @@ -283,7 +283,7 @@ def task_compile_document(path: Path = Path("in.txt")):

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_compile_document_to_out_if_document_has_relative_resources(tmp_path):
"""Test that motivates the ``"--cd"`` flag.
Expand Down Expand Up @@ -326,7 +326,7 @@ def task_compile_document(path: Path = Path("resources/content.tex")):

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_compile_document_w_wrong_flag(tmp_path):
"""Test that wrong flags raise errors."""
tmp_path.joinpath("sub").mkdir(parents=True)
Expand Down Expand Up @@ -361,7 +361,7 @@ def task_compile_document():


@needs_latexmk
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_compile_document_w_image(runner, tmp_path):
task_source = f"""
from pytask import Product
Expand Down Expand Up @@ -397,7 +397,7 @@ def task_compile_document():

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_compile_latex_document_w_multiple_marks(runner, tmp_path):
"""Test simple compilation."""
task_source = """
Expand Down Expand Up @@ -425,7 +425,7 @@ def task_compile_document():

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_compile_latex_document_with_wrong_extension(runner, tmp_path):
"""Test simple compilation."""
task_source = """
Expand All @@ -452,7 +452,7 @@ def task_compile_document():

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_compile_w_bibliography_and_keep_bbl(runner, tmp_path):
"""Compile a LaTeX document with bibliography."""
task_source = """
Expand Down Expand Up @@ -496,7 +496,7 @@ def task_compile_document(

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
@pytest.mark.parametrize(
("step", "message"),
[
Expand Down Expand Up @@ -536,7 +536,7 @@ def task_compile_document():

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_compile_latex_document_with_task_decorator(runner, tmp_path):
"""Test simple compilation."""
task_source = """
Expand All @@ -563,7 +563,7 @@ def compile_document():

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_use_task_without_path(tmp_path):
task_source = """
import pytask
Expand Down Expand Up @@ -591,7 +591,7 @@ def test_use_task_without_path(tmp_path):

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_collect_latex_document_with_product_from_another_task(runner, tmp_path):
"""Test simple compilation."""
task_source = """
Expand Down
2 changes: 1 addition & 1 deletion tests/test_latex_dependency_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
@pytest.mark.parametrize("infer_dependencies", ["true", "false"])
def test_infer_dependencies_from_task(tmp_path, infer_dependencies):
task_source = """
Expand Down
4 changes: 2 additions & 2 deletions tests/test_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
@xfail_on_remote
@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_parallel_parametrization_over_source_files_w_loop(runner, tmp_path):
source = """
from pytask import mark, task
Expand Down Expand Up @@ -68,7 +68,7 @@ def task_compile_latex_document():
@xfail_on_remote
@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_parallel_parametrization_over_source_file_w_loop(runner, tmp_path):
source = """
from pytask import mark, task
Expand Down
4 changes: 2 additions & 2 deletions tests/test_parametrize.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_parametrized_compilation_of_latex_documents_w_loop(tmp_path):
source = """
from pytask import mark, task
Expand Down Expand Up @@ -48,7 +48,7 @@ def task_compile_latex_document():

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_parametrizing_latex_options_w_loop(tmp_path):
source = """
from pytask import mark, task
Expand Down

0 comments on commit be94bee

Please sign in to comment.