#6 Revert "Skip cherrypy tests -- not available on Python 3.9 yet"
Merged 3 years ago by decathorpe. Opened 3 years ago by churchyard.
rpms/ churchyard/python-CacheControl cherrypy  into  master

file removed
-57
@@ -1,57 +0,0 @@ 

- diff --git a/tests/conftest.py b/tests/conftest.py

- index 28b80cc..05aac92 100644

- --- a/tests/conftest.py

- +++ b/tests/conftest.py

- @@ -5,7 +5,10 @@ import socket

-  

-  import pytest

-  

- -import cherrypy

- +try:

- +    import cherrypy

- +except ImportError:

- +    cherrypy = None

-  

-  

-  class SimpleApp(object):

- @@ -108,7 +111,10 @@ class SimpleApp(object):

-  

-  @pytest.fixture(scope="session")

-  def server():

- -    return cherrypy.server

- +    try:

- +        return cherrypy.server

- +    except AttributeError:

- +        pytest.skip("cherrypy not available")

-  

-  

-  @pytest.fixture()

- @@ -126,17 +132,20 @@ def get_free_port():

-  

-  

-  def pytest_configure(config):

- -    cherrypy.tree.graft(SimpleApp(), "/")

- -

- -    ip, port = get_free_port()

- +    try:

- +        cherrypy.tree.graft(SimpleApp(), "/")

- +    except AttributeError:

- +        pass

- +    else:

- +        ip, port = get_free_port()

-  

- -    cherrypy.config.update({"server.socket_host": ip, "server.socket_port": port})

- +        cherrypy.config.update({"server.socket_host": ip, "server.socket_port": port})

-  

- -    # turn off logging

- -    logger = cherrypy.log.access_log

- -    logger.removeHandler(logger.handlers[0])

- +        # turn off logging

- +        logger = cherrypy.log.access_log

- +        logger.removeHandler(logger.handlers[0])

-  

- -    cherrypy.server.start()

- +        cherrypy.server.start()

-  

-  

-  def pytest_unconfigure(config):

file modified
+5 -5
@@ -12,7 +12,7 @@ 

  Name:           python-%{pypi_name}

  Summary:        httplib2 caching for requests

  Version:        0.12.6

- Release:        3%{?dist}

+ Release:        4%{?dist}

  License:        MIT

  

  URL:            https://github.com/ionrock/cachecontrol
@@ -21,9 +21,6 @@ 

  # use mock from python standard library

  Patch0:         00-use-stdlib-mock.patch

  

- # Skip cherrypy tests -- not available on Python 3.9 yet, #1841688

- Patch1:         01-no-cherrypy.patch

- 

  BuildArch:      noarch

  

  %description %{common_description}
@@ -38,7 +35,7 @@ 

  BuildRequires:  python3-setuptools

  

  # test dependencies

- #BuildRequires:  python3-cherrypy

+ BuildRequires:  python3-cherrypy

  BuildRequires:  python3-pytest

  BuildRequires:  python3-lockfile

  BuildRequires:  python3-msgpack >= 0.5.2
@@ -80,6 +77,9 @@ 

  

  

  %changelog

+ * Fri Jun 05 2020 Miro Hrončok <mhroncok@redhat.com> - 0.12.6-4

+ - Rebuilt with cherrypy tests

+ 

  * Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.12.6-3

  - Rebuilt for Python 3.9

  

This reverts commit f7471b1.

Bumping the release, so the dependency is shown in repoqueries and for Koschei.

Pull-Request has been merged by decathorpe

3 years ago

Thanks! Do you want to submit a koji build or should i do it?

do it