From 25a183eb69a8a3cf1295dc33cc0ea6d0189b7847 Mon Sep 17 00:00:00 2001 From: lyn1001 Date: Thu, 3 Jun 2021 14:49:12 +0800 Subject: [PATCH] fix testcase failure --- 0001-modified-path-to-fix-testcase.patch | 25 ++++++++++++++++++++++++ python-pytest-shutil.spec | 7 +++++-- 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 0001-modified-path-to-fix-testcase.patch diff --git a/0001-modified-path-to-fix-testcase.patch b/0001-modified-path-to-fix-testcase.patch new file mode 100644 index 0000000..9cbdd2e --- /dev/null +++ b/0001-modified-path-to-fix-testcase.patch @@ -0,0 +1,25 @@ +From b960d8d90235218a3e1f66a2e59420087e27c14a Mon Sep 17 00:00:00 2001 +Subject: [PATCH] cmdline + +--- + tests/integration/test_cmdline_integration.py | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/tests/integration/test_cmdline_integration.py b/tests/integration/test_cmdline_integration.py +index 8d92a2e..e99831f 100644 +--- a/tests/integration/test_cmdline_integration.py ++++ b/tests/integration/test_cmdline_integration.py +@@ -5,6 +5,7 @@ from pytest_shutil import cmdline + + def test_chdir(): + here = os.getcwd() ++ bindir=os.path.realpath('/bin') + with cmdline.chdir('/bin'): +- assert os.getcwd() == '/bin' +- assert os.getcwd() == here +\ No newline at end of file ++ assert os.getcwd() == bindir ++ assert os.getcwd() == here +-- +2.23.0 + diff --git a/python-pytest-shutil.spec b/python-pytest-shutil.spec index cbaac69..5a04a75 100644 --- a/python-pytest-shutil.spec +++ b/python-pytest-shutil.spec @@ -1,11 +1,11 @@ Name: python-pytest-shutil Version: 1.2.6 -Release: 7 +Release: 8 Summary: A goodie-bag of unix shell and environment tools for py.test License: MIT URL: https://pypi.python.org/pypi/pytest-shutil Source0: https://files.pythonhosted.org/packages/f4/6c/c536c7bf1bd1d6a385eef074f581d513b4a5525b2bd5cc763f4870d66516/pytest-shutil-%{version}.tar.gz - +patch0001: 0001-modified-path-to-fix-testcase.patch BuildArch: noarch BuildRequires: python2-contextlib2 python2-devel python2-execnet python2-mock @@ -56,6 +56,9 @@ This library is a goodie-bag of Unix shell and environment management tools for %{python3_sitelib}/* %changelog +* Thu Jun 3 2021 liyanan - 1.2.6-8 +- fix testcase failure + * Thu Sep 10 2020 Ge Wang - 1.2.6-7 - Modify Source0 Url