Add upstream patch to run tests from project dir
This commit is contained in:
parent
2c594f80c5
commit
ffb114a0ba
|
@ -0,0 +1,12 @@
|
||||||
|
diff -up tornado-4.4.1/tornado/test/options_test.py.test tornado-4.4.1/tornado/test/options_test.py
|
||||||
|
--- tornado-4.4.1/tornado/test/options_test.py.test 2016-07-15 09:00:52.000000000 -0600
|
||||||
|
+++ tornado-4.4.1/tornado/test/options_test.py 2016-09-16 10:01:19.542583874 -0600
|
||||||
|
@@ -36,7 +36,7 @@ class OptionsTest(unittest.TestCase):
|
||||||
|
options.define("port", default=80)
|
||||||
|
options.define("username", default='foo')
|
||||||
|
options.define("my_path")
|
||||||
|
- config_path = os.path.join(os.path.dirname(__file__),
|
||||||
|
+ config_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
|
||||||
|
"options_test.cfg")
|
||||||
|
options.parse_config_file(config_path)
|
||||||
|
self.assertEqual(options.port, 443)
|
|
@ -15,6 +15,9 @@ URL: http://www.tornadoweb.org
|
||||||
Source0: https://pypi.python.org/packages/source/t/tornado/tornado-%{version}.tar.gz
|
Source0: https://pypi.python.org/packages/source/t/tornado/tornado-%{version}.tar.gz
|
||||||
# Patch to use system CA certs instead of certifi
|
# Patch to use system CA certs instead of certifi
|
||||||
Patch0: python-tornado-cert.patch
|
Patch0: python-tornado-cert.patch
|
||||||
|
# Patch to run tests from project dir
|
||||||
|
# https://github.com/tornadoweb/tornado/pull/1781
|
||||||
|
Patch1: python-tornado-test.patch
|
||||||
|
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
BuildRequires: python2-backports_abc
|
BuildRequires: python2-backports_abc
|
||||||
|
@ -96,6 +99,7 @@ ideal for real-time web services.
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{srcname}-%{version}
|
%setup -q -n %{srcname}-%{version}
|
||||||
%patch0 -p1 -b .cert
|
%patch0 -p1 -b .cert
|
||||||
|
%patch1 -p1 -b .test
|
||||||
# remove shebang from files
|
# remove shebang from files
|
||||||
%{__sed} -i.orig -e '/^#!\//, 1d' *py tornado/*.py tornado/*/*.py
|
%{__sed} -i.orig -e '/^#!\//, 1d' *py tornado/*.py tornado/*/*.py
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue