Files
python-pytest-bdd/python-pytest-bdd.spec
Steve Kowalik 3d5634cc01 - Update to 8.1.0:
* Added
    + Gherkin keyword aliases can now be used and correctly reported in json
      and terminal output.
    + Added localization support.
    + Rule keyword can be used in feature files.
    + Added support for multiple example tables
    + Added filtering by tags against example tables
    + Tags can now be on multiple lines (stacked)
    + Continuation of steps using asterisks instead of And/But supported.
    + Added ``datatable`` argument for steps that contain a datatable.
  * Changed
    + Step arguments "datatable" and "docstring" are now reserved, and they
      can't be used as step argument names.
    + Scenario description field is now set for Cucumber JSON output.
    + Text after the # character is no longer stripped from the Scenario and
      Feature name.
    + Use the gherkin-official parser, replacing the custom parsing logic.
    + Multiline steps must now always use triple-quotes for the additional
      lines.
    + All feature files must now use the keyword Feature: to be considered
      valid.
    + Tags can no longer have spaces.
    + Text after the # character is no longer stripped from the Step name.
    + Fixed an issue with the upcoming pytest release related to the use of
      @pytest.mark.usefixtures with an empty list.
  * Removed
    + Dropped support for python 3.8.
    + Drop compatibility with pytest < 7.0.0.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-bdd?expand=0&rev=29
2025-09-03 01:16:02 +00:00

104 lines
3.5 KiB
RPMSpec

#
# spec file for package python-pytest-bdd
#
# Copyright (c) 2025 SUSE LLC and contributors
#
# 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/
#
Name: python-pytest-bdd
Version: 8.1.0
Release: 0
Summary: BDD for pytest
License: MIT
URL: https://github.com/pytest-dev/pytest-bdd
Source: https://github.com/pytest-dev/pytest-bdd/archive/%{version}.tar.gz#/pytest-bdd-%{version}.tar.gz
BuildRequires: %{python_module base >= 3.9}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module poetry}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-Mako
Requires: python-gherkin-official >= 29
Requires: python-packaging
Requires: python-parse
Requires: python-parse_type
Requires: python-pytest >= 7.0.0
Requires: python-typing_extensions
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module Mako}
BuildRequires: %{python_module execnet}
BuildRequires: %{python_module gherkin-official >= 29}
BuildRequires: %{python_module packaging}
BuildRequires: %{python_module parse_type}
BuildRequires: %{python_module parse}
BuildRequires: %{python_module pytest >= 7.0.0}
BuildRequires: %{python_module typing_extensions}
%python_subpackages
%description
BDD library for the py.test runner
pytest-bdd implements a subset of Gherkin language for the automation of the project
requirements testing and easier behavioral driven development.
Unlike many other BDD tools it doesn't require a separate runner and benefits from
the power and flexibility of the pytest. It allows to unify your unit and functional
tests, easier continuous integration server configuration and maximal reuse of the
tests setup.
Pytest fixtures written for the unit tests can be reused for the setup and actions
mentioned in the feature steps with dependency injection, which allows a true BDD
just-enough specification of the requirements without maintaining any context object
containing the side effects of the Gherkin imperative declarations.
%prep
%setup -q -n pytest-bdd-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/pytest-bdd
%check
export LANG=en_US.UTF-8
%{python_expand # provide the u-a controlled command in PATH
mkdir -p build/testbin
ln -s %{buildroot}%{_bindir}/pytest-bdd-%{$python_bin_suffix} build/testbin/pytest-bdd
}
export PATH=$PWD/build/testbin:$PATH
# Broken upstream as of 8.1.0
%pytest -k 'not test_step_outside_scenario_or_background_error'
%post
%python_install_alternative pytest-bdd
%postun
%python_uninstall_alternative pytest-bdd
%files %{python_files}
%doc AUTHORS.rst CHANGES.rst README.rst
%license LICENSE.txt
%python_alternative %{_bindir}/pytest-bdd
%{python_sitelib}/pytest_bdd
%{python_sitelib}/pytest_bdd-%{version}.dist-info
%changelog