Sync from SUSE:SLFO:Main python-ddt revision 89f95a04995752d355bee94311bc0a74
This commit is contained in:
commit
94ed1b8a32
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
BIN
ddt-1.6.0.tar.gz
(Stored with Git LFS)
Normal file
BIN
ddt-1.6.0.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
215
python-ddt.changes
Normal file
215
python-ddt.changes
Normal file
@ -0,0 +1,215 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 21 12:24:09 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- add sle15_python_module_pythons (jsc#PED-68)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 13 22:40:51 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Make calling of %{sle15modernpython} optional.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 16 17:20:57 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Add remove-six.patch to remove six dependency
|
||||
- Remove python_module macro definition
|
||||
- More specific python_sitelib in %files
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 26 10:38:04 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 1.6.0:
|
||||
* Moved @named_data into main ddt.py module so it can be imported
|
||||
* Enable usage of Sequence in named_data.py
|
||||
* @named_data decorator to give tests with @DaTa custom names
|
||||
* End support for 3.5
|
||||
* Add new Python versions support
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 8 10:11:16 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- add six dependency
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Oct 16 21:01:08 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 1.4.4:
|
||||
* Fix the ddt.idata signature issue introduced in 1.4.3
|
||||
* Fix zero padding issue
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 7 20:25:34 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- fix python 2.x build
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 23 21:06:40 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 1.4.2:
|
||||
* Fix test failure with PyYAML 5.4.1
|
||||
- rm 0001-Use-Yaml-s-UnsafeLoader-for-Python-embedding-tests.patch:
|
||||
merged upstream
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 25 21:52:46 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- add 0001-Use-Yaml-s-UnsafeLoader-for-Python-embedding-tests.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 28 03:09:23 UTC 2020 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Update to 1.4.1:
|
||||
* Remove nose dependency for good
|
||||
* Require enum34 for Python 2.x.
|
||||
* Improved code comments and renamed the test name format enum class
|
||||
* Use enum instead of bool to allow easier future changes
|
||||
* Allow index-only test names
|
||||
- Switch to using %pytest macro now that nose is not required
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 2 10:30:10 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
|
||||
|
||||
- update to 1.3.1
|
||||
* Switched from Travis to Github Actions for builds and release upload.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Mar 14 15:49:10 UTC 2020 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- update to 1.3.0:
|
||||
* Added the ability to specify the YAML loader in the file_data decorator (#77)
|
||||
* Dropped Python 3.4 support
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 22 10:35:00 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Update to 1.2.2:
|
||||
* use mock only when it is really needed
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 7 14:07:30 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Update to 1.2.1:
|
||||
* Merge pull request #68 from datadriventests/fix-docstring-behavior
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 4 12:47:11 UTC 2018 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Remove superfluous devel dependency for noarch package
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 7 14:48:44 UTC 2018 - toddrme2178@gmail.com
|
||||
|
||||
- update to 1.2.0
|
||||
* Added individual test case docstring support and tests
|
||||
* Add nested dict example to docs and cosmetic adjustments
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 2 10:16:07 UTC 2017 - sebix+novell.com@sebix.at
|
||||
|
||||
- update to 1.1.1
|
||||
* Add `@idata(iterable)` decorator-function. (#40)
|
||||
* Set __wrapped__ for Python 2 (#45)
|
||||
* Include more files in generated tarballs (#43)
|
||||
- convert to singlespec
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 1 05:23:40 UTC 2016 - tbechtold@suse.com
|
||||
|
||||
update to version 1.1.0
|
||||
* Note explicit support for Python 3.5
|
||||
* Catch ImportErrors and improve coverage metrics
|
||||
* Document the YAML support
|
||||
* Refactor error functions in process_file_data
|
||||
* Bump version to 1.1.0
|
||||
* Add basic support for YAML data files
|
||||
* Bump version to 1.0.2
|
||||
* Bump version number
|
||||
* Properly handle file object
|
||||
* Fix the no-YAML installed test
|
||||
* Fix Flake8 warnings
|
||||
* Add more tests for YAML data files
|
||||
* Split process_file_data into 2 functions
|
||||
* Remove broken badge 'caniusepython3'
|
||||
* Variable naming changes
|
||||
* Flake8: make lambda into 'def' function
|
||||
* Unconditionally use PyPI mock
|
||||
* Fix copy-paste error
|
||||
* Fix unittest with object instance as data
|
||||
* Add mock to test requirements
|
||||
* Add PyYAML as a test dependency
|
||||
* RTD build trigger to use project name
|
||||
* Load the YAML data safely
|
||||
- Use pypi.io as Source url
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 15 21:55:39 UTC 2015 - dmueller@suse.com
|
||||
|
||||
- update to 1.0.1:
|
||||
* specify minimum version of six
|
||||
* Fix different test names with different runs
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 5 15:11:06 UTC 2015 - tbechtold@suse.com
|
||||
|
||||
- update to version 1.0.0:
|
||||
* Bump version
|
||||
* Minor changes to contributing and license docs
|
||||
* Merge pull request #24 from txels/carles/license
|
||||
* Update setup.py with new MIT License
|
||||
* Improve landscape.io ratings by reducing ddt complexity
|
||||
* Add landscape.io code health badge
|
||||
* Add MIT license
|
||||
* Reshuffle requirements, and add a document on contributing
|
||||
* Add python3 badge
|
||||
* Add script and config to release to pypi as wheel
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 8 13:49:32 UTC 2015 - tbechtold@suse.com
|
||||
|
||||
- update to version 0.8.1:
|
||||
* State support for Python3 in trove classifiers
|
||||
* Merge pull request #20 from santtu/fix_hash_randomization
|
||||
* I really ought to look at my flymake output too.
|
||||
* Added if pushed line too long, wrapped.
|
||||
* Cleaned up some code, added check for <3.2.3 versions, updated tests.
|
||||
* A possible fix for https://github.com/txels/ddt/issues/19
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 15 08:48:09 UTC 2014 - tbechtold@suse.com
|
||||
|
||||
- update to version 0.8.0:
|
||||
* Ensure tests get different names by adding an ordinal
|
||||
* Merge pull request #18 from elyezer/master
|
||||
* Do not allow invalid characters on test names
|
||||
* Ensure that new test functions are given the right name.
|
||||
* Document use of
|
||||
* Update docs to not keep track of example test output
|
||||
* Stop testing on python 3.2 with tox
|
||||
* Version 0.7.0
|
||||
* Fix flake8 issues
|
||||
* Add flake8 checks to Travis-CI build
|
||||
* Merge pull request #16 from ITAttractor/unpack-feature
|
||||
* #3 test_example.py - added tests for @unpack decorator for
|
||||
unpacking lists, tuples and dictionary
|
||||
ddt.py - added unpack decorator that sets
|
||||
UNPACK_ATTR for the decorated function
|
||||
* added functionality to extract tuples into multiple parameters
|
||||
* Add note about supported version in docs
|
||||
* Increase version number
|
||||
* Merge pull request #14 from txels/edx-support-unicode-data
|
||||
* Update documentation for non-ASCII data
|
||||
* Speed-up Travis build.
|
||||
* Support python2 and python3
|
||||
* Add support for unicode in ddt data
|
||||
* Build for Python 3.3 on Travis
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 13 14:04:36 UTC 2014 - dmueller@suse.com
|
||||
|
||||
- update to 0.5.0:
|
||||
* Fix bug where test methods were named with data __name__ only
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 17 07:17:24 UTC 2013 - speilicke@suse.com
|
||||
|
||||
- Initial version
|
67
python-ddt.spec
Normal file
67
python-ddt.spec
Normal file
@ -0,0 +1,67 @@
|
||||
#
|
||||
# spec file for package python-ddt
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%bcond_without python2
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-ddt
|
||||
Version: 1.6.0
|
||||
Release: 0
|
||||
Summary: Data-Driven/Decorated Tests
|
||||
License: MIT
|
||||
URL: https://github.com/txels/ddt
|
||||
Source: https://files.pythonhosted.org/packages/source/d/ddt/ddt-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM remove-six.patch gh#datadriventests/ddt#110
|
||||
Patch0: remove-six.patch
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildArch: noarch
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module PyYAML}
|
||||
BuildRequires: %{python_module pytest}
|
||||
%if %{with python2}
|
||||
BuildRequires: python2-enum34
|
||||
BuildRequires: python2-mock
|
||||
%endif
|
||||
# /SECTION
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
A library to multiply test cases.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n ddt-%{version}
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
%pytest
|
||||
|
||||
%files %{python_files}
|
||||
%doc CONTRIBUTING.md README.md
|
||||
%license LICENSE.md
|
||||
%{python_sitelib}/ddt.py
|
||||
%{python_sitelib}/ddt-%{version}*-info
|
||||
%pycache_only %{python_sitelib}/__pycache__
|
||||
|
||||
%changelog
|
75
remove-six.patch
Normal file
75
remove-six.patch
Normal file
@ -0,0 +1,75 @@
|
||||
Index: ddt-1.6.0/test/test_functional.py
|
||||
===================================================================
|
||||
--- ddt-1.6.0.orig/test/test_functional.py
|
||||
+++ ddt-1.6.0/test/test_functional.py
|
||||
@@ -1,8 +1,8 @@
|
||||
import os
|
||||
import json
|
||||
+import sys
|
||||
from sys import modules
|
||||
import pytest
|
||||
-import six
|
||||
|
||||
try:
|
||||
from unittest import mock
|
||||
@@ -444,35 +444,35 @@ def test_ddt_data_doc_attribute():
|
||||
assert getattr(getattr(ddt_mytest, 'second_test_3'), '__doc__') is None
|
||||
|
||||
|
||||
-def test_ddt_data_unicode():
|
||||
+@pytest.mark.skipif(sys.version_info.major > 2, reason='Python2 only test')
|
||||
+def test_ddt_data_unicode_py2():
|
||||
"""
|
||||
Test that unicode strings are converted to function names correctly
|
||||
"""
|
||||
- # We test unicode support separately for python 2 and 3
|
||||
-
|
||||
- if six.PY2:
|
||||
+ @ddt
|
||||
+ class Mytest(object):
|
||||
+ @data(u'ascii', u'non-ascii-\N{SNOWMAN}', {u'\N{SNOWMAN}': 'data'})
|
||||
+ def test_hello(self, val):
|
||||
+ pass
|
||||
+
|
||||
+ assert getattr(Mytest, 'test_hello_1_ascii') is not None
|
||||
+ assert getattr(Mytest, 'test_hello_2_non_ascii__u2603') is not None
|
||||
+ assert getattr(Mytest, 'test_hello_3') is not None
|
||||
|
||||
- @ddt
|
||||
- class Mytest(object):
|
||||
- @data(u'ascii', u'non-ascii-\N{SNOWMAN}', {u'\N{SNOWMAN}': 'data'})
|
||||
- def test_hello(self, val):
|
||||
- pass
|
||||
-
|
||||
- assert getattr(Mytest, 'test_hello_1_ascii') is not None
|
||||
- assert getattr(Mytest, 'test_hello_2_non_ascii__u2603') is not None
|
||||
- assert getattr(Mytest, 'test_hello_3') is not None
|
||||
-
|
||||
- elif six.PY3:
|
||||
-
|
||||
- @ddt
|
||||
- class Mytest(object):
|
||||
- @data('ascii', 'non-ascii-\N{SNOWMAN}', {'\N{SNOWMAN}': 'data'})
|
||||
- def test_hello(self, val):
|
||||
- pass
|
||||
-
|
||||
- assert getattr(Mytest, 'test_hello_1_ascii') is not None
|
||||
- assert getattr(Mytest, 'test_hello_2_non_ascii__') is not None
|
||||
- assert getattr(Mytest, 'test_hello_3') is not None
|
||||
+@pytest.mark.skipif(sys.version_info.major < 3, reason='Python3 only test')
|
||||
+def test_ddt_data_unicode_py3():
|
||||
+ """
|
||||
+ Test that unicode strings are converted to function names correctly
|
||||
+ """
|
||||
+ @ddt
|
||||
+ class Mytest(object):
|
||||
+ @data('ascii', 'non-ascii-\N{SNOWMAN}', {'\N{SNOWMAN}': 'data'})
|
||||
+ def test_hello(self, val):
|
||||
+ pass
|
||||
+
|
||||
+ assert getattr(Mytest, 'test_hello_1_ascii') is not None
|
||||
+ assert getattr(Mytest, 'test_hello_2_non_ascii__') is not None
|
||||
+ assert getattr(Mytest, 'test_hello_3') is not None
|
||||
|
||||
|
||||
def test_ddt_data_object():
|
Loading…
x
Reference in New Issue
Block a user