Skip to content

Commit

Permalink
Update versions
Browse files Browse the repository at this point in the history
 - Drop python 3.8
 - Add python 3.13
 - Drop pytest<5.2
 - Update pre-commit deps
  • Loading branch information
elchupanebrej committed Oct 29, 2024
1 parent 46b0759 commit 60aacf7
Show file tree
Hide file tree
Showing 36 changed files with 298 additions and 314 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ jobs:
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "pypy3.8"
- "3.13"
- "pypy3.9"
- "pypy3.10"
os:
Expand Down Expand Up @@ -47,13 +46,18 @@ jobs:
- name: Install npm dependencies
run: npm install --global
- name: Test with tox
if: >
!((matrix.python-version == '3.12' ||
matrix.python-version == '3.11' ||
matrix.python-version == '3.10') &&
(matrix.os =='macos-latest' || matrix.os =='windows-latest'))
run: |
tox
- name: Gather codecov
run: |
codecov
- name: Build checking
if: "matrix.python-version == '3.12'"
if: "matrix.python-version == '3.13'"
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
submodules: 'recursive'
- uses: actions/setup-python@v4
with:
python-version: "3.12"
python-version: "3.13"
- name: Install dependencies
run: |
python -m pip install --upgrade pip build twine
Expand Down
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,33 @@
---
repos:
- repo: https://github.com/psf/black
rev: 23.3.0
rev: 24.10.0
hooks:
- id: black
args:
- docs
- "src/pytest_bdd"
- tests
- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-toml
- repo: https://github.com/asottile/pyupgrade
rev: v3.7.0
rev: v3.19.0
hooks:
- id: pyupgrade
args: ["--py38-plus"]
args: ["--py39-plus"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.3.0
rev: v1.13.0
hooks:
- id: mypy
additional_dependencies:
Expand All @@ -38,16 +38,16 @@ repos:
- types-certifi
- types-setuptools
- repo: https://github.com/tox-dev/tox-ini-fmt
rev: "1.1.0"
rev: "1.4.1"
hooks:
- id: tox-ini-fmt
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.21.0
rev: v1.35.1
hooks:
- id: yamllint
args: [--format, parsable, --strict]
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.9.0
rev: v2.14.0
hooks:
- id: pretty-format-toml
args: [--autofix]
Expand Down
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ Planned

Unreleased
----------
- Update versions:
- Drop python 3.8
- Add python 3.13
- Drop pytest<5.2
- Added dummy html reporter
- Fixed pytest.ini option "disable_feature_autoload"
- Improved fixture injection by adding seamless fixtures on plugin/module collection

Expand Down
166 changes: 83 additions & 83 deletions docs/features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,75 +7,99 @@ Features



Feature
-------
Tutorial
--------

Tag conversion
##############
Launch
######

.. include:: ../features/Feature/Tag conversion.feature
.. include:: ../features/Tutorial/Launch.feature
:code: gherkin

Tag
###
Step definition
---------------

.. include:: ../features/Feature/Tag.feature
Pytest fixtures substitution
############################

.. include:: ../features/Step definition/Pytest fixtures substitution.feature
:code: gherkin

Description
###########
Target fixtures specification
#############################

.. include:: ../features/Feature/Description.feature
.. include:: ../features/Step definition/Target fixtures specification.feature
:code: gherkin

Localization
############
Parameters
##########

.. include:: ../features/Feature/Localization.feature
:code: gherkin
Conversion
!!!!!!!!!!

Load
####
.. include:: ../features/Step definition/Parameters/Conversion.feature
:code: gherkin

Autoload
Defaults
!!!!!!!!

.. include:: ../features/Feature/Load/Autoload.feature
.. include:: ../features/Step definition/Parameters/Defaults.feature
:code: gherkin

Scenario function loader
Injection as fixtures
!!!!!!!!!!!!!!!!!!!!!

.. include:: ../features/Step definition/Parameters/Injection as fixtures.feature
:code: gherkin

Parsing by custom parser
!!!!!!!!!!!!!!!!!!!!!!!!

.. include:: ../features/Feature/Load/Scenario function loader.feature
.. include:: ../features/Step definition/Parameters/Parsing by custom parser.feature
:code: gherkin

Scenario search from base directory
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Parsing
!!!!!!!

.. include:: ../features/Feature/Load/Scenario search from base directory.feature
.. include:: ../features/Step definition/Parameters/Parsing.feature
:code: gherkin

Scenario search from base url
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Step
----

.. include:: ../features/Feature/Load/Scenario search from base url.feature
Data table
##########

.. include:: ../features/Step/Data table.feature
:code: gherkin

Scenario
--------
Doc string
##########

Tag
###
.. include:: ../features/Step/Doc string.feature
:code: gherkin

.. include:: ../features/Scenario/Tag.feature
Step definition bounding
########################

.. include:: ../features/Step/Step definition bounding.feature
:code: gherkin

Scenario
--------

Description
###########

.. include:: ../features/Scenario/Description.feature
:code: gherkin

Tag
###

.. include:: ../features/Scenario/Tag.feature
:code: gherkin

Outline
#######

Expand All @@ -94,80 +118,56 @@ Gathering
.. include:: ../features/Report/Gathering.feature
:code: gherkin

Tutorial
--------

Launch
######

.. include:: ../features/Tutorial/Launch.feature
:code: gherkin

Step
----

Data table
##########

.. include:: ../features/Step/Data table.feature
:code: gherkin
Feature
-------

Step definition bounding
########################
Description
###########

.. include:: ../features/Step/Step definition bounding.feature
.. include:: ../features/Feature/Description.feature
:code: gherkin

Doc string
##########
Localization
############

.. include:: ../features/Step/Doc string.feature
.. include:: ../features/Feature/Localization.feature
:code: gherkin

Step definition
---------------

Target fixtures specification
#############################
Tag conversion
##############

.. include:: ../features/Step definition/Target fixtures specification.feature
.. include:: ../features/Feature/Tag conversion.feature
:code: gherkin

Pytest fixtures substitution
############################
Tag
###

.. include:: ../features/Step definition/Pytest fixtures substitution.feature
.. include:: ../features/Feature/Tag.feature
:code: gherkin

Parameters
##########

Injection as fixtures
!!!!!!!!!!!!!!!!!!!!!

.. include:: ../features/Step definition/Parameters/Injection as fixtures.feature
:code: gherkin
Load
####

Parsing
!!!!!!!
Autoload
!!!!!!!!

.. include:: ../features/Step definition/Parameters/Parsing.feature
.. include:: ../features/Feature/Load/Autoload.feature
:code: gherkin

Parsing by custom parser
Scenario function loader
!!!!!!!!!!!!!!!!!!!!!!!!

.. include:: ../features/Step definition/Parameters/Parsing by custom parser.feature
.. include:: ../features/Feature/Load/Scenario function loader.feature
:code: gherkin

Conversion
!!!!!!!!!!
Scenario search from base directory
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. include:: ../features/Step definition/Parameters/Conversion.feature
.. include:: ../features/Feature/Load/Scenario search from base directory.feature
:code: gherkin

Defaults
!!!!!!!!
Scenario search from base url
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. include:: ../features/Step definition/Parameters/Defaults.feature
.. include:: ../features/Feature/Load/Scenario search from base url.feature
:code: gherkin
6 changes: 4 additions & 2 deletions docs/tutorial/src/catalog.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"""This files represents simple `Application under test`"""

from collections.abc import Iterable
from dataclasses import dataclass, field
from typing import Iterable, List
from typing import List


@dataclass # Easy way to not write redundant __init__ https://docs.python.org/3/library/dataclasses.html
Expand All @@ -11,7 +13,7 @@ class Book:

@dataclass
class Catalog:
storage: List[Book] = field(default_factory=list)
storage: list[Book] = field(default_factory=list)

def add_books_to_catalog(self, books: Iterable[Book]):
self.storage.extend(books)
Expand Down
Loading

0 comments on commit 60aacf7

Please sign in to comment.