forked from pool/python-parse_type
Accepting request 726503 from home:mcalabkova:branches:devel:languages:python
- update to version 0.5.2 * requires parse >= 1.12.0 * test fixes - shortened patch testsuite-fix.patch OBS-URL: https://build.opensuse.org/request/show/726503 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-parse_type?expand=0&rev=5
This commit is contained in:
committed by
Git OBS Bridge
parent
bf127397a7
commit
431ab2842f
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f596bdc75d3dd93036fbfe3d04127da9f6df0c26c36e01e76da85adef4336b3c
|
||||
size 264473
|
||||
3
parse_type-0.5.2.tar.gz
Normal file
3
parse_type-0.5.2.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7f690b18d35048c15438d6d0571f9045cffbec5907e0b1ccf006f889e3a38c0b
|
||||
size 272082
|
||||
@@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 27 13:57:32 UTC 2019 - Marketa Calabkova <mcalabkova@suse.com>
|
||||
|
||||
- update to version 0.5.2
|
||||
* requires parse >= 1.12.0
|
||||
* test fixes
|
||||
- shortened patch testsuite-fix.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 14 00:56:44 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
|
||||
@@ -18,35 +18,34 @@
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-parse_type
|
||||
Version: 0.4.2
|
||||
Version: 0.5.2
|
||||
Release: 0
|
||||
Summary: Extension to the parse module
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Languages/Python
|
||||
Url: https://github.com/jenisys/parse_type
|
||||
URL: https://github.com/jenisys/parse_type
|
||||
Source: https://files.pythonhosted.org/packages/source/p/parse_type/parse_type-%{version}.tar.gz
|
||||
Patch0: testsuite-fix.patch
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: python2-enum34
|
||||
Requires: python-parse >= 1.12.0
|
||||
Requires: python-six >= 1.11
|
||||
Suggests: python-coverage
|
||||
Suggests: python-enum34
|
||||
Suggests: python-ordereddict
|
||||
Suggests: python-pytest >= 3.0
|
||||
Suggests: python-pytest-cov
|
||||
Suggests: python-sphinx >= 1.2
|
||||
Suggests: python-tox
|
||||
BuildArch: noarch
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module parse >= 1.11}
|
||||
BuildRequires: %{python_module parse >= 1.12.0}
|
||||
BuildRequires: %{python_module pytest >= 3.0}
|
||||
BuildRequires: %{python_module six >= 1.11}
|
||||
# /SECTION
|
||||
BuildRequires: fdupes
|
||||
Requires: python-parse >= 1.11
|
||||
Requires: python-six >= 1.11
|
||||
Suggests: python-enum34
|
||||
Suggests: python-ordereddict
|
||||
Suggests: python-coverage
|
||||
Suggests: python-pytest >= 3.0
|
||||
Suggests: python-pytest-cov
|
||||
Suggests: python-tox
|
||||
Suggests: python-sphinx >= 1.2
|
||||
BuildArch: noarch
|
||||
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
@@ -63,7 +62,7 @@ the following features:
|
||||
|
||||
%prep
|
||||
%setup -q -n parse_type-%{version}
|
||||
%autopatch -p1
|
||||
%patch0 -p1
|
||||
|
||||
# Remove bundled parse.py
|
||||
rm -fv parse_type/parse.py
|
||||
@@ -76,7 +75,7 @@ rm -fv parse_type/parse.py
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
%python_expand py.test-%{$python_bin_suffix} -v -k 'not (test_parse_with_many0_and_unnamed_fields or test_parse_with_many_and_unnamed_fields or test_parse_with_optional_and_unnamed_fields or test_pm_overflow_issue16)'
|
||||
%pytest -k 'not (test_parse_with_many0_and_unnamed_fields or test_parse_with_many_and_unnamed_fields or test_parse_with_optional_and_unnamed_fields or test_pm_overflow_issue16)'
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
|
||||
@@ -1,61 +1,5 @@
|
||||
--- a/tests/test_cardinality.py
|
||||
+++ b/tests/test_cardinality.py
|
||||
@@ -5,11 +5,12 @@ Test suite to test the :mod:`parse_type.
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
-from .parse_type_test import ParseTypeTestCase, parse_number
|
||||
-from parse_type import Cardinality, TypeBuilder, build_type_dict
|
||||
-from parse_type.parse import Parser as ParserExt
|
||||
import parse
|
||||
import unittest
|
||||
+from parse import Parser as ParserExt
|
||||
+
|
||||
+from .parse_type_test import ParseTypeTestCase, parse_number
|
||||
+from parse_type import Cardinality, TypeBuilder, build_type_dict
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# TEST CASE: TestCardinality
|
||||
--- a/tests/test_builder.py
|
||||
+++ b/tests/test_builder.py
|
||||
@@ -495,35 +495,6 @@ Person: Alice
|
||||
self.assertIsNotNone(result)
|
||||
self.assertEqual(result.fixed, tuple(expected))
|
||||
|
||||
- def test_parse_with_many_unnamed_fields_with_variants(self):
|
||||
- from parse_type.parse import Parser as Parser2
|
||||
- type_dict = build_type_dict(self.TYPE_CONVERTERS)
|
||||
- schema = """\
|
||||
-Number: {:Number}
|
||||
-YesNo: {:YesNo}
|
||||
-Color: {:Color}
|
||||
-Person: {:PersonChoice}
|
||||
-Variant2: {:Color_or_PersonChoice}
|
||||
-Variant1: {:Number_or_YesNo}
|
||||
-"""
|
||||
- # -- OMIT: XFAIL, due to group_index delta counting => Parser problem.
|
||||
- parser = Parser2(schema, type_dict)
|
||||
-
|
||||
- text = """\
|
||||
-Number: 12
|
||||
-YesNo: yes
|
||||
-Color: red
|
||||
-Person: Alice
|
||||
-Variant2: Bob
|
||||
-Variant1: 42
|
||||
-"""
|
||||
- expected = [ 12, True, Color.red, "Alice", "Bob", 42 ]
|
||||
-
|
||||
- result = parser.parse(text)
|
||||
- self.assertIsNotNone(result)
|
||||
- self.assertEqual(result.fixed, tuple(expected))
|
||||
-
|
||||
-
|
||||
# -----------------------------------------------------------------------------
|
||||
# MAIN:
|
||||
# -----------------------------------------------------------------------------
|
||||
--- a/tests/test_parse_type_parse.py
|
||||
+++ b/tests/test_parse_type_parse.py
|
||||
--- a/tests/test_parse.py
|
||||
+++ b/tests/test_parse.py
|
||||
@@ -22,14 +22,7 @@ from datetime import datetime, time
|
||||
import re
|
||||
|
||||
|
||||
Reference in New Issue
Block a user