Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pytask-dev/pytask-latex
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 30e5aa34674c59782213d76e76616a37ea2bc1f3
Choose a base ref
..
head repository: pytask-dev/pytask-latex
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 36ee149e71f198e595afa3acd37a7eb49f47e82c
Choose a head ref
Showing with 29 additions and 30 deletions.
  1. +1 −1 .pre-commit-config.yaml
  2. +1 −1 tests/conftest.py
  3. +1 −2 tests/test_collect.py
  4. +1 −1 tests/test_config.py
  5. +20 −20 tests/test_execute.py
  6. +1 −1 tests/test_latex_dependency_scanner.py
  7. +2 −2 tests/test_parallel.py
  8. +2 −2 tests/test_parametrize.py
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ repos:
- id: python-use-type-annotations
- id: text-unicode-replacement-char
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
rev: v0.7.0
hooks:
- id: ruff
- id: ruff-format
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
@@ -85,6 +85,6 @@ def invoke(self, *args, **kwargs):
return super().invoke(*args, **kwargs)


@pytest.fixture
@pytest.fixture()
def runner():
return CustomCliRunner()
3 changes: 1 addition & 2 deletions tests/test_collect.py
Original file line number Diff line number Diff line change
@@ -3,11 +3,10 @@
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"),
[
2 changes: 1 addition & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
@@ -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
@@ -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 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.
@@ -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 = """
@@ -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"""
@@ -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 = """
@@ -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 = """
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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.
@@ -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)
@@ -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
@@ -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 = """
@@ -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 = """
@@ -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 = """
@@ -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"),
[
@@ -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 = """
@@ -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
@@ -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 = """
2 changes: 1 addition & 1 deletion tests/test_latex_dependency_scanner.py
Original file line number Diff line number Diff line change
@@ -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 = """
4 changes: 2 additions & 2 deletions tests/test_parallel.py
Original file line number Diff line number Diff line change
@@ -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
@@ -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
4 changes: 2 additions & 2 deletions tests/test_parametrize.py
Original file line number Diff line number Diff line change
@@ -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
@@ -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