15
0
forked from pool/python-behave

- update to 1.3.3:

* v1.3.2: Broke Python 2.7 support (submitted by: silent-observer)
- 1.3.2:
  * Recursive discovery and import in steps directory is now disabled by default.
  * RTFD: Enable PDF output format again (for download).
  * Improve command-line option descriptions (show: value).
  * Use "confval" directive for config-file parameters.
  * api: Add "Configuration" class description.
  * Include changes from pull #1258
  * Fix more deadlinks in docs
  * behave4cmd0: Update version info to v1.3.1
  * behave4cmd0.command_shell: Cleanup of BEHAVE_CMD value usage.
  * Update to python-version: "3.14.0-rc.2" (was: "3.14.0-rc.1")
  * Update actions/checkout to v5 (was: v4).
  * Use astral-sh/setup-uv@v6 (was: v3).
- 1.3.1:
  * ImportError: cannot import name 'asynccontextmanager' not found in python 3.6 (submitted by: rzuckerm)
  * AmbiguousStep error on step import with "re" step-matcher (submitted by: VolodymyrDan00)
  * Add section with description of "Runners" extension point.
  * Add section with "Cucumber-Expressions".
  * docs: userdata (provided by: Therdel, fixes: #1234)
  * userdata_defines configuration file parameter is not up to date (submitted by: vvavrychuk)
- 1.3.0:
  * Gherkin v6 support
  * Native support for cucumber-expressions as step matcher
  * Native support for async-steps
  * Support for tag-expressions v2
  * Distinguish in outcome between failures (assert-failed) and errors (unexpected exceptions at runtime)
  * Improved captured-output support
  * Improved logging support and log-to-file support

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-behave?expand=0&rev=17
This commit is contained in:
2025-11-12 20:28:37 +00:00
committed by Git OBS Bridge
commit 588150a580
9 changed files with 570 additions and 0 deletions

View File

@@ -0,0 +1,98 @@
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)