Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-behave for openSUSE:Factory checked in at 2022-05-18 13:13:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-behave (Old) and /work/SRC/openSUSE:Factory/.python-behave.new.1538 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-behave" Wed May 18 13:13:25 2022 rev:5 rq:977831 version:1.2.6 Changes: -------- --- /work/SRC/openSUSE:Factory/python-behave/python-behave.changes 2022-03-01 17:04:31.056348550 +0100 +++ /work/SRC/openSUSE:Factory/.python-behave.new.1538/python-behave.changes 2022-05-18 13:13:31.226680073 +0200 @@ -1,0 +2,12 @@ +Tue May 17 14:54:59 UTC 2022 - [email protected] + +- test the package +- do not require python-mock for build +- added patches + https://github.com/behave/behave/commit/83906ba779956af9437defcb8975debb18440e0d + https://github.com/behave/behave/commit/66fcadb23bea79e60f370e66bf7588de2f1934e3 + + python-behave-fix-tests.patch + fix https://github.com/behave/behave/issues/1028 + + python-behave-no-mock.patch + +------------------------------------------------------------------- New: ---- python-behave-fix-tests.patch python-behave-no-mock.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-behave.spec ++++++ --- /var/tmp/diff_new_pack.CNfRss/_old 2022-05-18 13:13:31.762680526 +0200 +++ /var/tmp/diff_new_pack.CNfRss/_new 2022-05-18 13:13:31.766680529 +0200 @@ -26,6 +26,11 @@ URL: https://github.com/behave/behave Source: https://files.pythonhosted.org/packages/source/b/behave/behave-%{version}.tar.gz Patch1: no2to3.patch +# https://github.com/behave/behave/commit/83906ba779956af9437defcb8975debb18440e0d +# https://github.com/behave/behave/commit/66fcadb23bea79e60f370e66bf7588de2f1934e3 +Patch2: python-behave-fix-tests.patch +# https://github.com/behave/behave/issues/1028 +Patch3: python-behave-no-mock.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: fdupes @@ -55,7 +60,6 @@ BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module PyHamcrest >= 1.8} -BuildRequires: %{python_module mock >= 1.1} BuildRequires: %{python_module parse >= 1.8.2} BuildRequires: %{python_module parse_type >= 0.4.2} BuildRequires: %{python_module path.py >= 10.1} @@ -73,8 +77,7 @@ code. %prep -%setup -q -n behave-%{version} -%patch1 -p1 +%autosetup -p1 -n behave-%{version} %build %python_build @@ -85,6 +88,7 @@ %python_expand %fdupes %{buildroot}%{$python_sitelib} %check +%pytest tests %post %python_install_alternative behave ++++++ python-behave-fix-tests.patch ++++++ Index: behave-1.2.6/tests/unit/test_capture.py =================================================================== --- behave-1.2.6.orig/tests/unit/test_capture.py +++ behave-1.2.6/tests/unit/test_capture.py @@ -20,6 +20,8 @@ def create_capture_controller(config=Non config.log_capture = True config.logging_filter = None config.logging_level = "INFO" + config.logging_format = "%(levelname)s:%(name)s:%(message)s" + config.logging_datefmt = None return CaptureController(config) def setup_capture_controller(capture_controller, context=None): Index: behave-1.2.6/tests/issues/test_issue0458.py =================================================================== --- behave-1.2.6.orig/tests/issues/test_issue0458.py +++ behave-1.2.6/tests/issues/test_issue0458.py @@ -48,7 +48,7 @@ def test_issue(exception_class, message) raise_exception(exception_class, message) # -- SHOULD NOT RAISE EXCEPTION HERE: - text = _text(e) + text = _text(e.value) # -- DIAGNOSTICS: print(u"text"+ text) print(u"exception: %s" % e) Index: behave-1.2.6/tests/unit/test_context_cleanups.py =================================================================== --- behave-1.2.6.orig/tests/unit/test_context_cleanups.py +++ behave-1.2.6/tests/unit/test_context_cleanups.py @@ -153,7 +153,7 @@ class TestContextCleanup(object): with pytest.raises(AssertionError) as e: with scoped_context_layer(context): context.add_cleanup(non_callable) - assert "REQUIRES: callable(cleanup_func)" in str(e) + assert "REQUIRES: callable(cleanup_func)" in str(e.value) def test_on_cleanup_error__prints_error_by_default(self, capsys): def bad_cleanup_func(): Index: behave-1.2.6/tests/unit/test_textutil.py =================================================================== --- behave-1.2.6.orig/tests/unit/test_textutil.py +++ behave-1.2.6/tests/unit/test_textutil.py @@ -212,9 +212,11 @@ class TestObjectToTextConversion(object) with pytest.raises(AssertionError) as e: assert False, message - text2 = text(e) - expected = u"AssertionError: %s" % message - assert text2.endswith(expected) + # -- FOR: pytest < 5.0 + # expected = u"AssertionError: %s" % message + text2 = text(e.value) + assert u"AssertionError" in text(e) + assert message in text2, "OOPS: text=%r" % text2 @requires_python2 @pytest.mark.parametrize("message", [ @@ -226,9 +228,11 @@ class TestObjectToTextConversion(object) with pytest.raises(AssertionError) as e: assert False, bytes_message - text2 = text(e) - expected = u"AssertionError: %s" % message - assert text2.endswith(expected) + # -- FOR: pytest < 5.0 + # expected = u"AssertionError: %s" % message + text2 = text(e.value) + assert message in text2, "OOPS: text=%r" % text2 + @pytest.mark.parametrize("exception_class, message", [ (AssertionError, u"??rgernis"), @@ -240,10 +244,13 @@ class TestObjectToTextConversion(object) with pytest.raises(exception_class) as e: raise exception_class(message) - text2 = text(e) + # -- FOR: pytest < 5.0 + # expected = u"AssertionError: %s" % message + text2 = text(e.value) expected = u"%s: %s" % (exception_class.__name__, message) assert isinstance(text2, six.text_type) - assert text2.endswith(expected) + assert exception_class.__name__ in str(e) + assert message in text2, "OOPS: text=%r" % text2 @requires_python2 @pytest.mark.parametrize("exception_class, message", [ @@ -257,7 +264,7 @@ class TestObjectToTextConversion(object) with pytest.raises(exception_class) as e: raise exception_class(bytes_message) - text2 = text(e) + text2 = text(e.value) unicode_message = bytes_message.decode(self.ENCODING) expected = u"%s: %s" % (exception_class.__name__, unicode_message) assert isinstance(text2, six.text_type) ++++++ python-behave-no-mock.patch ++++++ diff -upr behave-1.2.6.orig/test/reporters/test_summary.py behave-1.2.6/test/reporters/test_summary.py --- behave-1.2.6.orig/test/reporters/test_summary.py 2022-05-17 16:51:03.364286060 +0200 +++ behave-1.2.6/test/reporters/test_summary.py 2022-05-17 16:51:03.432286489 +0200 @@ -2,7 +2,7 @@ from __future__ import absolute_import, division import sys -from mock import Mock, patch +from unittest.mock import Mock, patch from nose.tools import * from behave.model import ScenarioOutline, Scenario from behave.model_core import Status diff -upr behave-1.2.6.orig/test/test_formatter.py behave-1.2.6/test/test_formatter.py --- behave-1.2.6.orig/test/test_formatter.py 2022-05-17 16:51:03.364286060 +0200 +++ behave-1.2.6/test/test_formatter.py 2022-05-17 16:51:03.432286489 +0200 @@ -6,7 +6,7 @@ import sys import tempfile import unittest import six -from mock import Mock, patch +from unittest.mock import Mock, patch from nose.tools import * # pylint: disable=wildcard-import, unused-wildcard-import from behave.formatter._registry import make_formatters diff -upr behave-1.2.6.orig/test/test_log_capture.py behave-1.2.6/test/test_log_capture.py --- behave-1.2.6.orig/test/test_log_capture.py 2022-05-17 16:51:03.364286060 +0200 +++ behave-1.2.6/test/test_log_capture.py 2022-05-17 16:51:03.436286514 +0200 @@ -1,7 +1,7 @@ from __future__ import absolute_import, with_statement from nose.tools import * -from mock import patch +from unittest.mock import patch from behave.log_capture import LoggingCapture from six.moves import range diff -upr behave-1.2.6.orig/test/test_matchers.py behave-1.2.6/test/test_matchers.py --- behave-1.2.6.orig/test/test_matchers.py 2022-05-17 16:51:03.364286060 +0200 +++ behave-1.2.6/test/test_matchers.py 2022-05-17 16:51:03.436286514 +0200 @@ -1,6 +1,6 @@ # -*- coding: UTF-8 -*- from __future__ import absolute_import, with_statement -from mock import Mock, patch +from unittest.mock import Mock, patch from nose.tools import * # pylint: disable=wildcard-import, unused-wildcard-import import parse from behave.matchers import Match, Matcher, ParseMatcher, RegexMatcher, \ diff -upr behave-1.2.6.orig/test/test_model.py behave-1.2.6/test/test_model.py --- behave-1.2.6.orig/test/test_model.py 2022-05-17 16:51:03.364286060 +0200 +++ behave-1.2.6/test/test_model.py 2022-05-17 16:51:03.436286514 +0200 @@ -3,7 +3,7 @@ from __future__ import absolute_import, print_function, with_statement import unittest -from mock import Mock, patch +from unittest.mock import Mock, patch from nose.tools import * # pylint: disable=wildcard-import, unused-wildcard-import import six from six.moves import range # pylint: disable=redefined-builtin diff -upr behave-1.2.6.orig/test/test_runner.py behave-1.2.6/test/test_runner.py --- behave-1.2.6.orig/test/test_runner.py 2022-05-17 16:51:03.364286060 +0200 +++ behave-1.2.6/test/test_runner.py 2022-05-17 16:51:03.436286514 +0200 @@ -12,7 +12,7 @@ import unittest import six from six import StringIO -from mock import Mock, patch +from unittest.mock import Mock, patch from nose.tools import * # pylint: disable=wildcard-import, unused-wildcard-import from behave import runner_util diff -upr behave-1.2.6.orig/test/test_step_registry.py behave-1.2.6/test/test_step_registry.py --- behave-1.2.6.orig/test/test_step_registry.py 2022-05-17 16:51:03.364286060 +0200 +++ behave-1.2.6/test/test_step_registry.py 2022-05-17 16:51:03.436286514 +0200 @@ -1,7 +1,7 @@ # -*- coding: UTF-8 -*- # pylint: disable=unused-wildcard-import from __future__ import absolute_import, with_statement -from mock import Mock, patch +from unittest.mock import Mock, patch from nose.tools import * # pylint: disable=wildcard-import from six.moves import range # pylint: disable=redefined-builtin from behave import step_registry diff -upr behave-1.2.6.orig/test/test_tag_matcher.py behave-1.2.6/test/test_tag_matcher.py --- behave-1.2.6.orig/test/test_tag_matcher.py 2022-05-17 16:51:03.364286060 +0200 +++ behave-1.2.6/test/test_tag_matcher.py 2022-05-17 16:51:03.436286514 +0200 @@ -2,7 +2,7 @@ from __future__ import absolute_import from behave.tag_matcher import * -from mock import Mock +from unittest.mock import Mock from unittest import TestCase import warnings # -- REQUIRES: pytest diff -upr behave-1.2.6.orig/tests/api/_test_async_step34.py behave-1.2.6/tests/api/_test_async_step34.py --- behave-1.2.6.orig/tests/api/_test_async_step34.py 2022-05-17 16:51:03.412286363 +0200 +++ behave-1.2.6/tests/api/_test_async_step34.py 2022-05-17 16:51:03.436286514 +0200 @@ -9,7 +9,7 @@ from behave.api.async_step import AsyncC from behave._stepimport import use_step_import_modules from behave.runner import Context, Runner import sys -from mock import Mock +from unittest.mock import Mock import pytest from .testing_support import StopWatch, SimpleStepContainer diff -upr behave-1.2.6.orig/tests/unit/test_capture.py behave-1.2.6/tests/unit/test_capture.py --- behave-1.2.6.orig/tests/unit/test_capture.py 2022-05-17 16:51:03.412286363 +0200 +++ behave-1.2.6/tests/unit/test_capture.py 2022-05-17 16:51:03.440286539 +0200 @@ -6,7 +6,7 @@ Unittests for :mod:`behave.capture` modu from __future__ import absolute_import, print_function import sys from behave.capture import Captured, CaptureController -from mock import Mock +from unittest.mock import Mock import pytest # ----------------------------------------------------------------------------- diff -upr behave-1.2.6.orig/tests/unit/test_context_cleanups.py behave-1.2.6/tests/unit/test_context_cleanups.py --- behave-1.2.6.orig/tests/unit/test_context_cleanups.py 2022-05-17 16:51:03.412286363 +0200 +++ behave-1.2.6/tests/unit/test_context_cleanups.py 2022-05-17 16:51:03.440286539 +0200 @@ -13,7 +13,7 @@ OPEN ISSUES: from __future__ import print_function from behave.runner import Context, scoped_context_layer from contextlib import contextmanager -from mock import Mock, NonCallableMock +from unittest.mock import Mock, NonCallableMock import pytest diff -upr behave-1.2.6.orig/tests/unit/test_fixture.py behave-1.2.6/tests/unit/test_fixture.py --- behave-1.2.6.orig/tests/unit/test_fixture.py 2022-05-17 16:51:03.412286363 +0200 +++ behave-1.2.6/tests/unit/test_fixture.py 2022-05-17 16:51:03.440286539 +0200 @@ -12,7 +12,7 @@ from behave.fixture import \ from behave.runner import Context, CleanupError, scoped_context_layer from behave._types import Unknown import pytest -from mock import Mock +from unittest.mock import Mock import six
