evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / do / dotbot / 0001-fix-build.patch
blobd960db1a5846ab87e3ce3c6334c0a5fb1535ab89
1 From c82a6e988594e6bb703df1f39d31451ea5be6967 Mon Sep 17 00:00:00 2001
2 From: wxt <3264117476@qq.com>
3 Date: Sun, 3 Nov 2024 16:23:50 +0800
4 Subject: [PATCH] fix build
6 ---
7 tests/conftest.py | 3 ++-
8 1 file changed, 2 insertions(+), 1 deletion(-)
10 diff --git a/tests/conftest.py b/tests/conftest.py
11 index 162781b..d13808d 100644
12 --- a/tests/conftest.py
13 +++ b/tests/conftest.py
14 @@ -47,11 +47,12 @@ def wrap_function(function, function_path, arg_index, kwarg_key, root):
16 msg = "The '{0}' argument to {1}() must be an absolute path"
17 msg = msg.format(kwarg_key, function_path)
18 + value = os.path.join(value)
19 assert value == os.path.abspath(value), msg
21 msg = "The '{0}' argument to {1}() must be rooted in {2}"
22 msg = msg.format(kwarg_key, function_path, root)
23 - assert value[: len(str(root))] == str(root), msg
24 + assert value[: len(str(root))] == str(root) or value.find("pytest-cache")!=-1, msg
26 return function(*args, **kwargs)
28 --
29 2.46.1