44 lines
2.2 KiB
Diff
44 lines
2.2 KiB
Diff
From 5042fdb83644e09fc2d126ddc73c7f680b9472f7 Mon Sep 17 00:00:00 2001
|
|
From: shixuantong <shixuantong@huawei.com>
|
|
Date: Fri, 23 Apr 2021 16:47:29 +0800
|
|
Subject: [PATCH] Instances of pytest's tmp_path fixture in tests/test_bytecode_cache.py
|
|
have been replaced by instances of the older style tmpdir fixture
|
|
|
|
==================================== ERRORS ====================================
|
|
_______________ ERROR at setup of TestByteCodeCache.test_simple ________________
|
|
file /home/abuild/rpmbuild/BUILD/Jinja2-2.11.2/Jinja2-2.11.2/tests/test_bytecode_cache.py, line 18
|
|
def test_simple(self, env):
|
|
file /home/abuild/rpmbuild/BUILD/Jinja2-2.11.2/Jinja2-2.11.2/tests/test_bytecode_cache.py, line 11
|
|
@pytest.fixture
|
|
def env(package_loader, tmp_path):
|
|
E fixture 'tmp_path' not found
|
|
> available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, choice_loader, dict_loader, doctest_namespace, env, filesystem_loader, function_loader, monkeypatch, package_loader, prefix_loader, pytestconfig, record_property, record_xml_attribute, record_xml_property, recwarn, tmpdir, tmpdir_factory
|
|
> use 'pytest --fixtures [testpath]' for help on them.
|
|
|
|
/home/abuild/rpmbuild/BUILD/Jinja2-2.11.2/Jinja2-2.11.2/tests/test_bytecode_cache.py:11
|
|
=============== 653 passed, 8 skipped, 1 error in 14.76 seconds ================
|
|
|
|
pytest dependency is too low, tmp_path was added in 3.9.0, For details, see the pytest 3.9.0 release note at https://docs.pytest.org/en/stable/changelog.html
|
|
---
|
|
Jinja2-2.11.2/tests/test_bytecode_cache.py | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/Jinja2-2.11.2/tests/test_bytecode_cache.py b/Jinja2-2.11.2/tests/test_bytecode_cache.py
|
|
index c7882b1..d0a4352 100644
|
|
--- a/Jinja2-2.11.2/tests/test_bytecode_cache.py
|
|
+++ b/Jinja2-2.11.2/tests/test_bytecode_cache.py
|
|
@@ -9,8 +9,8 @@ from jinja2.exceptions import TemplateNotFound
|
|
|
|
|
|
@pytest.fixture
|
|
-def env(package_loader, tmp_path):
|
|
- bytecode_cache = FileSystemBytecodeCache(str(tmp_path))
|
|
+def env(package_loader, tmpdir):
|
|
+ bytecode_cache = FileSystemBytecodeCache(str(tmpdir))
|
|
return Environment(loader=package_loader, bytecode_cache=bytecode_cache)
|
|
|
|
|
|
--
|
|
2.23.0
|
|
|