- Update to 1.8.0:
* add ``"importlib"`` pyimport mode for python3.5+, allowing unimportable test suites to contain identically named modules. * fix ``LocalPath.as_cwd()`` not calling ``os.chdir()`` with ``None``, when being invoked from a non-existing directory. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-py?expand=0&rev=12
This commit is contained in:
parent
3875c0afb0
commit
7cc7715a9a
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:bf92637198836372b520efcba9e020c330123be8ce527e535d185ed4b6f45694
|
|
||||||
size 202733
|
|
3
py-1.8.0.tar.gz
Normal file
3
py-1.8.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:dc639b046a6e2cff5bbe40194ad65936d6ba360b52b3c3fe1d08a82dd50b5e53
|
||||||
|
size 205096
|
@ -1,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Feb 27 13:48:08 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
- Update to 1.8.0:
|
||||||
|
* add ``"importlib"`` pyimport mode for python3.5+, allowing unimportable test suites
|
||||||
|
to contain identically named modules.
|
||||||
|
* fix ``LocalPath.as_cwd()`` not calling ``os.chdir()`` with ``None``, when
|
||||||
|
being invoked from a non-existing directory.
|
||||||
|
- Drop merged patch separators.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Feb 15 11:19:55 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
Fri Feb 15 11:19:55 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
@ -19,14 +19,13 @@
|
|||||||
%define oldpython python
|
%define oldpython python
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-py
|
Name: python-py
|
||||||
Version: 1.7.0
|
Version: 1.8.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Library with cross-python path, ini-parsing, io, code, log facilities
|
Summary: Library with cross-python path, ini-parsing, io, code, log facilities
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/pytest-dev/py
|
URL: https://github.com/pytest-dev/py
|
||||||
Source: https://files.pythonhosted.org/packages/source/p/py/py-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/p/py/py-%{version}.tar.gz
|
||||||
Patch0: separators.patch
|
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module setuptools_scm}
|
BuildRequires: %{python_module setuptools_scm}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
@ -48,7 +47,6 @@ the following tools and modules:
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n py-%{version}
|
%setup -q -n py-%{version}
|
||||||
%patch0 -p1
|
|
||||||
|
|
||||||
rm -rf py.egg-info
|
rm -rf py.egg-info
|
||||||
rm -f tox.ini
|
rm -f tox.ini
|
||||||
|
@ -1,51 +0,0 @@
|
|||||||
From a499409ee0f1234d45a80bf918cca18259fa9e1c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Anthony Sottile <asottile@umich.edu>
|
|
||||||
Date: Thu, 22 Nov 2018 14:24:11 -0800
|
|
||||||
Subject: [PATCH] Have at least one separator in sep()
|
|
||||||
|
|
||||||
Before:
|
|
||||||
|
|
||||||
```
|
|
||||||
1 failed, 1 passed, 1 skipped, 1 deselected, 1 xfailed, 1 xpassed, 1 error in 0.04 seconds
|
|
||||||
```
|
|
||||||
|
|
||||||
After:
|
|
||||||
|
|
||||||
```
|
|
||||||
= 1 failed, 1 passed, 1 skipped, 1 deselected, 1 xfailed, 1 xpassed, 1 error in 0.04 seconds =
|
|
||||||
```
|
|
||||||
---
|
|
||||||
py/_io/terminalwriter.py | 2 +-
|
|
||||||
testing/io_/test_terminalwriter.py | 6 ++++++
|
|
||||||
2 files changed, 7 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/py/_io/terminalwriter.py b/py/_io/terminalwriter.py
|
|
||||||
index 817bf2d8..be559867 100644
|
|
||||||
--- a/py/_io/terminalwriter.py
|
|
||||||
+++ b/py/_io/terminalwriter.py
|
|
||||||
@@ -227,7 +227,7 @@ def sep(self, sepchar, title=None, fullwidth=None, **kw):
|
|
||||||
# i.e. 2 + 2*len(sepchar)*N + len(title) <= fullwidth
|
|
||||||
# 2*len(sepchar)*N <= fullwidth - len(title) - 2
|
|
||||||
# N <= (fullwidth - len(title) - 2) // (2*len(sepchar))
|
|
||||||
- N = (fullwidth - len(title) - 2) // (2*len(sepchar))
|
|
||||||
+ N = max((fullwidth - len(title) - 2) // (2*len(sepchar)), 1)
|
|
||||||
fill = sepchar * N
|
|
||||||
line = "%s %s %s" % (fill, title, fill)
|
|
||||||
else:
|
|
||||||
diff --git a/testing/io_/test_terminalwriter.py b/testing/io_/test_terminalwriter.py
|
|
||||||
index 64b07568..1eef7f7d 100644
|
|
||||||
--- a/testing/io_/test_terminalwriter.py
|
|
||||||
+++ b/testing/io_/test_terminalwriter.py
|
|
||||||
@@ -165,6 +165,12 @@ def test_sep_with_title(self, tw):
|
|
||||||
assert len(l) == 1
|
|
||||||
assert l[0] == "-" * 26 + " hello " + "-" * (27-win32) + "\n"
|
|
||||||
|
|
||||||
+ def test_sep_longer_than_width(self, tw):
|
|
||||||
+ tw.sep('-', 'a' * 10, fullwidth=5)
|
|
||||||
+ line, = tw.getlines()
|
|
||||||
+ # even though the string is wider than the line, still have a separator
|
|
||||||
+ assert line == '- aaaaaaaaaa -\n'
|
|
||||||
+
|
|
||||||
@py.test.mark.skipif("sys.platform == 'win32'")
|
|
||||||
def test__escaped(self, tw):
|
|
||||||
text2 = tw._escaped("hello", (31))
|
|
Loading…
x
Reference in New Issue
Block a user