forked from pool/python-PyLaTeX
- Add denose.patch removing nose dependency (gh#JelteF/PyLaTeX#294).
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyLaTeX?expand=0&rev=5
This commit is contained in:
48
denose.patch
Normal file
48
denose.patch
Normal file
@@ -0,0 +1,48 @@
|
||||
--- a/tests/test_forced_dumps_implementation.py
|
||||
+++ b/tests/test_forced_dumps_implementation.py
|
||||
@@ -1,16 +1,16 @@
|
||||
from pylatex.base_classes import LatexObject
|
||||
-from nose.tools import raises
|
||||
+from pytest import raises
|
||||
|
||||
|
||||
class BadObject(LatexObject):
|
||||
pass
|
||||
|
||||
|
||||
-@raises(TypeError)
|
||||
def test_latex_object():
|
||||
- LatexObject()
|
||||
+ with raises(TypeError):
|
||||
+ LatexObject()
|
||||
|
||||
|
||||
-@raises(TypeError)
|
||||
def test_bad_object():
|
||||
- BadObject()
|
||||
+ with raises(TypeError):
|
||||
+ BadObject()
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -29,8 +29,8 @@ extras = {
|
||||
'quantities': ['quantities', 'numpy'],
|
||||
'testing': ['flake8<3.0.0', 'pep8-naming==0.8.2',
|
||||
'flake8_docstrings==1.3.0', 'pycodestyle==2.0.0',
|
||||
- 'pydocstyle==3.0.0', 'pyflakes==1.2.3', 'nose', 'flake8-putty',
|
||||
- 'coverage'],
|
||||
+ 'pydocstyle==3.0.0', 'pyflakes==1.2.3', 'pytest', 'flake8-putty',
|
||||
+ 'coverage', 'pytest-cov'],
|
||||
'convert_to_py2': ['3to2', 'future>=0.15.2'],
|
||||
}
|
||||
|
||||
--- a/testall.sh
|
||||
+++ b/testall.sh
|
||||
@@ -66,7 +66,7 @@ else
|
||||
fi
|
||||
|
||||
echo -e '\e[32mTesting tests directory\e[0m'
|
||||
-if ! $python "$(command -v nosetests)" --with-coverage tests/*; then
|
||||
+if ! $python "$(command -v pytest)" --cov=pylatex tests/*; then
|
||||
exit 1
|
||||
fi
|
||||
mv .coverage{,.tests}
|
@@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 3 06:35:01 UTC 2020 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Add denose.patch removing nose dependency (gh#JelteF/PyLaTeX#294).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 8 13:29:44 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
|
||||
|
||||
|
@@ -26,6 +26,9 @@ License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/JelteF/PyLaTeX
|
||||
Source: https://github.com/JelteF/PyLaTeX/archive/v%{version}.tar.gz#/PyLaTeX-%{version}.tar.gz
|
||||
# PATCH-FEATURE-UPSTREAM denose.patch gh#JelteF/PyLaTeX#294 mcepl@suse.com
|
||||
# Remove nose dependency
|
||||
Patch0: denose.patch
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
@@ -66,8 +69,11 @@ Recommends: tex(tikz.sty)
|
||||
Recommends: tex(xcolor.sty)
|
||||
BuildArch: noarch
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module nose}
|
||||
BuildRequires: %{python_module matplotlib}
|
||||
BuildRequires: %{python_module numpy}
|
||||
BuildRequires: %{python_module ordered-set}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module quantities}
|
||||
BuildRequires: texlive-latex
|
||||
BuildRequires: tex(amsmath.sty)
|
||||
BuildRequires: tex(booktabs.sty)
|
||||
@@ -106,6 +112,7 @@ PyLaTeX is a Python library for creating and compiling LaTeX files.
|
||||
|
||||
%prep
|
||||
%setup -q -n PyLaTeX-%{version}
|
||||
%autopatch -p1
|
||||
|
||||
%build
|
||||
%python_build
|
||||
@@ -116,7 +123,8 @@ PyLaTeX is a Python library for creating and compiling LaTeX files.
|
||||
|
||||
%check
|
||||
# Quantities is an optional dependency that currently doesn't work
|
||||
%python_expand nosetests-%{$python_bin_suffix} -v -e 'test_quantities'
|
||||
# %%python_expand nosetests-%%{$python_bin_suffix} -v -e 'test_quantities'
|
||||
%pytest
|
||||
|
||||
%files %{python_files}
|
||||
%doc README.rst
|
||||
|
Reference in New Issue
Block a user