Commit Graph

327 Commits

Author SHA1 Message Date
Oleg Pidsadnyi d52dea9215 Preparing the scenario for multiple example tables 2022-01-12 15:54:02 +01:00
Oleg Pidsadnyi 6e421679b4 Release 5.0.0 2021-10-25 18:09:25 +02:00
pre-commit-ci[bot] bc7c209476 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2021-09-27 19:47:32 +00:00
Alessio Bogon 379cb4b47c
Rewrite scenario/feature examples logic (#445)
* rewrite examples subsitution using templating

* Remove “example_converters”

* Remove "expanded" option. It's now the default

* Add utility functions to be able to inspect tests run by the pytester.

* use better timer

* Fix typos

* Fix and simplify tests

* Update to latest python 3.10 version

* Add isort configuration and pre-commit hook

* Fix imports

* Fix types

* Update changelog

* Update README (mainly fix typos, remove outdated options)

* Fix examples in README

* Remove python2 junk

Co-authored-by: Oleg Pidsadnyi <oleg.pidsadnyi@gmail.com>
2021-09-23 21:07:15 +02:00
Oleg Pidsadnyi c6b7134e59 Revert "Allows use <params> in parsers defined steps"
This reverts commit 7850f218b7.
2021-08-18 09:23:31 +02:00
Konstantin Goloveshko 7850f218b7 Allows use <params> in parsers defined steps
So parsers could parse values defined in Examples
2021-08-17 20:59:14 +02:00
Alessio Bogon 3dce929a77 Version 4.1.0 (also fix the way we release) 2021-07-03 10:58:04 +02:00
Alessio Bogon f172bd6fe2
Merge branch 'master' into then-when-target-fixture 2021-07-03 10:16:59 +02:00
Alessio Bogon 775b6dc630 Update pre-commit hooks' version and apply them to all the files. 2021-07-03 10:16:33 +02:00
Alessio Bogon ad593d2caf Let "when" and "then" steps define a target fixture.
See discussion at https://github.com/pytest-dev/pytest-bdd/issues/402#issuecomment-869615840
2021-07-03 09:45:21 +02:00
Alessio Bogon 0930c8a043 remove redundant variable 2021-04-28 15:37:55 +02:00
Alessio Bogon 86c471a24f Remove ancient pytest compatibility 2021-04-28 12:39:59 +02:00
Alessio Bogon 635dd3f679 Remove compatibility code for ancient versions of pytest 2021-04-28 12:33:22 +02:00
Alessio Bogon c197799e02 Simplify code 2021-04-28 12:06:27 +02:00
Alessio Bogon 757b055a6c Make code more straight forward and avoid using pytest internals 2021-04-28 11:08:46 +02:00
Alessio Bogon 57b71c5b9f
Merge branch 'master' into generate-missing-parsers 2021-04-27 09:47:29 +02:00
Alessio Bogon cdb1bdada9
Add `pyupgrade` tool to pre-commit hooks (#416)
* `pyupgrade --py36-plus tests/**/*.py pytest_bdd/**/*.py setup.py`

* add pyupgrade to pre-commit config
2021-04-16 09:35:49 +02:00
marcbrossaissogeti 3a730e4dcc
cast "values" as a string because it could be another type if using e… (#335)
* cast "values" as a string because it could be another type if using example converters

* Test for int string and float value

Co-authored-by: Marc BROSSAIS <marc.brossais@capgemini.com>
Co-authored-by: Alessio Bogon <youtux@users.noreply.github.com>
2021-04-15 10:45:24 +02:00
Antoine Dao 5694c5778e Fix generate-missing for parsed fixtures 2021-04-09 14:15:10 +01:00
Konstantin Goloveshko e1dc0cad9a Update python and pytest
- Drop support of python 2.7, 3.5; Add explicit support for python >=3.6
- Remove six dependency
- Simplify getting step parser strategy; If step could be stringified it could be used
- Respect pytest --strict option in tests
2021-03-02 19:08:00 +02:00
Alessio Bogon 7cb344ef64
Fix bug when using comments in the "Examples:" section (#398)
* Fix bug when using comments in the "Examples:" section
2020-12-07 13:38:07 +01:00
Alessio Bogon 02e667f239
Move Feature, Scenario, Step classes into the parser module (#388)
* Move the parsing logic to its own module

* Remove Feature.get_feature classmethod, in favour of the get_feature function on the feature module
2020-09-15 11:18:57 +02:00
Alessio Bogon cba9a8ba90 Bump version 4.0.1 2020-09-08 12:03:15 +02:00
Alessio Bogon a8c1ff4ff3
Fix performance regression from version 4.0.0 (#386)
* Fix performance issue when collecting tests.

* Add changelog entry
2020-09-08 11:59:01 +02:00
Alessio Bogon 99f8a5342a Version 4
Do not include CHANGES.rst in the PyPI description, as we use custom sphinx extensions.
2020-09-07 11:18:39 +02:00
Alessio Bogon 853c615748
Support for pytest 6 "--import-mode=importlib" (#384)
* Fix compatibility with pytest 6 "--import-mode=importlib"

* Rewrite `scenario` and `scenarios` tests so that we can easily parametrize with the different pytest --import-mode.

* Update changelog
2020-09-07 09:43:29 +02:00
Alessio Bogon fc9adba38b Blackify code 2020-09-05 20:17:25 +02:00
Alessio Bogon 688c963dac Fix gherkin terminal reporter not displaying the test item location (a test was failing). 2020-09-05 20:04:25 +02:00
Oleg Pidsadnyi 8008c0f4bc
Given step is no longer a fixture (#376)
* Removing strict gherkin.
* Update README.rst
* Update CHANGELOG
2020-07-01 11:57:00 +02:00
Jeongsoo Park d5cd4da93d fix incomparable tuple 2020-06-25 09:40:37 +02:00
Oleg Pidsadnyi bfefabeb27
Some more test cleanup (#375)
* Some more test cleanup

* Docs updated
2020-06-24 09:24:04 +02:00
Oleg Pidsadnyi 76ed2ece2a
Cleanuptests2 (#370)
* Cleaning up tests

* Changelog entry
2020-06-18 08:36:12 +02:00
Oleg Pidsadnyi 6ba231fbe3
Converting tests (#367)
* Converting tests to use the correct pytest methodology for plugins
2020-06-14 12:16:09 +02:00
Alessio Bogon be94d2e55a Fix typo 2020-06-04 17:06:05 +02:00
Alessio Bogon 62f2d9d1aa Fix typo 2020-06-04 17:01:00 +02:00
Alessio Bogon 42a1e4ea21 Blackify 2020-06-04 17:01:00 +02:00
Alessio Bogon 4a39fd3a92 Parse multilines according to the gherkin specification (delimited by `"""` quotes) 2020-06-04 17:01:00 +02:00
Oleg Pidsadnyi 34bc88572b Preparing the release 3.3.0 2020-04-22 22:00:25 +02:00
Vitalii Buriak 65873276d3 Clean script file. 2020-04-22 14:51:17 +02:00
Vitalii Buriak 605ab1b453 Relax Gherkin validation for simple steps generator. 2020-04-22 14:51:17 +02:00
Vitalii Buriak b6786a0102 Possible to relax Gherkin validation for simple steps generator. 2020-04-22 14:51:17 +02:00
Mark Moes 36bd74b040 Implement parsing escaped pipe characters in outline parameters (#337)
* Implement parsing escaped pipe characters in outline parameters

* Use unicode_literals to fix test_outline error in Python 2
2019-11-23 15:11:03 +01:00
Alessio Bogon 76d4d876d6 Blackify scripts.py 2019-11-20 22:05:40 +01:00
Mark Moes 34b7f96b77 Escape quote in generation (#327)
* Escape single quotes in generated test names

* Escape single, double, triple-single and triple-double quoted (doc)strings in generated code
2019-10-20 18:53:29 +02:00
Hugo van Kemenade 9dc09bcd06 Fix for Python 4 and drop support for pytest < 4.3 (#332)
* Fix for Python 4

* Drop support for pytest < 4.3

* Update changelog and authors
2019-10-11 10:53:04 +02:00
Alessio Bogon d26411fe2e
Drop compatibility with pytest < 3.6 (#322)
* Remove support code for pytest < 3.6

* Update setup.py tags

* Require pytest>=3.6 from setup.py
2019-10-11 09:34:48 +02:00
Alessio Bogon 6047a35ef1 Apply `black` formatter to the codebase 2019-08-27 17:54:58 +02:00
James Harris b95e8e35c3 Fix pytest --generate --fixtures flag
This patch resolves the issues where pytest will try to double load the
pytest_cmd_main.
2019-08-23 21:51:40 +02:00
Alessio Bogon 386ed90cec
Fix item collection breaking when non Function items are present (#318)
* Fix item collection breaking when non Function items are present

* Bump version 3.2.1
2019-08-21 13:21:08 +02:00
Alessio Bogon 398c50f70c Bump version 3.2.0 2019-08-20 11:07:11 +02:00