From 75a1b9e1199f8eaf5b25cb8cccd3cc9e81a43bba Mon Sep 17 00:00:00 2001 From: Adrien Berchet Date: Thu, 8 Feb 2024 09:40:42 +0100 Subject: [PATCH] Test: Fix compatibility with pytest>=8 (#110) --- setup.py | 4 ++-- tests/test_task.py | 3 ++- tests/test_util.py | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 5a78b52..9632435 100644 --- a/setup.py +++ b/setup.py @@ -32,9 +32,9 @@ test_reqs = [ "mock>=3", - "pytest>=7", + "pytest>=8", "pytest-cov>=3", - "pytest-html>=3", + "pytest-html>=4", ] setup( diff --git a/tests/test_task.py b/tests/test_task.py index e081548..3235e17 100644 --- a/tests/test_task.py +++ b/tests/test_task.py @@ -478,7 +478,8 @@ def check_exception(task, exception): assert not luigi.build([TaskH()], local_scheduler=True) assert failed_task == [str(TaskG(g="another_new_value"))] assert exceptions == [ - "assert 'another_new_value' == 'new_value'\n - new_value\n + another_new_value" + "assert 'another_new_value' == 'new_value'\n \n - new_value\n + " + "another_new_value" ] def test_compare_inherits(self, luigi_tools_working_directory): diff --git a/tests/test_util.py b/tests/test_util.py index 19e886b..798039a 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -498,7 +498,7 @@ def check_exception(task, exception): assert failed_task == [str(Task(a="a_from_cfg", expected_a="different_value"))] assert exceptions == [ - "assert 'a_from_cfg' == 'different_value'\n - different_value\n + a_from_cfg" + "assert 'a_from_cfg' == 'different_value'\n \n - different_value\n + a_from_cfg" ] def test_config_file(self, Task):