Commit Graph

93 Commits

Author SHA1 Message Date
Alessio Bogon 7c714f5599 Merge remote-tracking branch 'origin/master' into rewrite-parser
# Conflicts:
#	pytest_bdd/parser.py
#	tests/feature/test_scenarios.py
2022-03-05 17:33:54 +01:00
Alessio Bogon 644df2ee52 Use newer typing syntax 2022-02-24 16:00:36 +01:00
Alessio Bogon 021aa3a2e3 Use "from __future__ import annotations" to be less verbose 2022-02-24 15:32:20 +01: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
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 4e0cbb0659 Test some real usage of the new parser! 2020-09-15 11:41:33 +02: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 c77ae529e9 Move all the parsing models to the parser module. 2020-09-13 20:36:00 +02:00
Alessio Bogon d6c541f033 Fix circular import 2020-09-13 20:22:30 +02:00
Alessio Bogon 4fc0570e8e Remove Feature.get_feature, in favour of the get_feature function 2020-09-13 20:15:47 +02:00
Alessio Bogon 1d8f81e222 Move most of the parsing logic to its own module 2020-09-13 19:55:16 +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
Oleg Pidsadnyi bfefabeb27
Some more test cleanup (#375)
* Some more test cleanup

* Docs updated
2020-06-24 09:24:04 +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
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 6047a35ef1 Apply `black` formatter to the codebase 2019-08-27 17:54:58 +02:00
Anthony Sottile ce63d93152 Fix invalid escape sequences 2018-06-30 08:35:52 -07:00
Oleg Pidsadnyi 7c6ba36ffc
Fixes #201 and pytest compatibility. (#232)
* Fixes #201 and pytest compatibility.

* Review comments
2018-01-23 20:43:43 +01:00
Sergey Kraynev 5d40f2c28e Fix #210 do not raise wrong Error for no strict gherkin feature
The issue, that if user disable strict gherkin check, it will lead to
situation, when wrong Error be raised. For the current situation it was
a message, that Step is defined outside of Background section.

Current patch makes check for orphan steps more tolerant for features
without strict gherkin syntax.

Also README was updated to show explicitly, that using "When, Then" is
prohibited in "Background" section.
2017-04-27 09:37:22 +03:00
Adam Coddington 3b1539788d Relay fixture results to recursive call of 'get_features'. 2016-10-20 16:38:38 -07:00
Florian Bruhin 14cc037c58 Don't parse scenario lines containing @ as tag 2016-09-15 17:39:28 +02:00
Florian Bruhin 9b78948efa Allow spaces in tags 2016-06-29 19:21:55 +02:00
Oleg Pidsadnyi cc87b5b0dd Better error explanation for the steps defined outside of scenarios 2016-06-21 16:08:31 +02:00
Oleg Pidsadnyi be79c1d534 Cleaned up hooks of the plugin, fixed report serialization to use builtin types. 2016-03-19 00:54:03 +01:00
Florian Bruhin b5738ad1e4 Allow tags after background section - fixes #160. 2016-01-24 19:52:05 +01:00
Anatoly Bubenkov 342e02dc99 Add examples data in the scenario report. closes #145 2015-08-31 16:38:52 +02:00
Anatoly Bubenkov be64d6cc42 test fixes 2015-08-31 10:35:05 +02:00
Anatoly Bubenkov 8bbc4580a0 Properly parse feature description. closes #144 2015-08-31 10:32:13 +02:00
Anatoly Bubenkov 4610ef5580 Avoid potentially random collection order for xdist compartibility. closes #138 2015-08-04 15:49:05 +02:00
Anatoly Bubenkov d18ba44f20 Add validation check which prevents having multiple features in a single feature file. closes #135 2015-07-07 22:49:49 +02:00
Anatoly Bubenkov 831d2122dc increase test coverage 2015-06-24 01:17:34 +02:00
Anatoly Bubenkov 24522b8fdc Allow mixing feature example table with scenario example table 2015-06-23 23:10:13 +02:00
Anatoly Bubenkov 8af2e0f0e0 feature outline 2015-06-21 00:30:46 +02:00
Anatoly Bubenkov 2b96f61268 respect strict_gherkin also for scenarios shortcut 2015-06-20 23:55:27 +02:00
Anatoly Bubenkov f4f0f99563 respect strict_gherkin also for backgrounds 2015-06-19 10:34:59 +02:00
Anatoly Bubenkov a7272beea2 Make it possible to relax strict Gherkin scenario validation. closes #118. closes #119 2015-06-15 23:58:45 +02:00
Anatoly Bubenkov 954180716c Mention step type on step definition not found errors and in code generation. closes #125 2015-06-10 10:03:17 +02:00
Anatoly Bubenkov 8209470b27 Make feature and scenario tags to be fully compartible with pytest markers. closes #112 2015-06-04 14:02:19 +02:00
Anatoly Bubenkov 24684bfb82 Fixed FeatureError string representation to correctly support python3. closes #115 2015-06-04 10:29:18 +02:00
Anatoly Bubenkov 29f2c1cbe4 Implemented shortcut to automatically bind scenarios to tests. closes #103, #89, #92, #90 2015-03-18 23:51:37 +01:00
Anatoly Bubenkov 988a120ba4 use codecs 2015-03-15 16:27:09 +01:00
Leonardo Santagada 41acbf4148 better parsing of comments, fix #99 2015-03-15 12:19:52 -03:00
Oleg Pidsadnyi 7fcd7e2eba Refactor of the feature step, reporting and fix for the multiline background steps. 2014-11-09 12:56:50 +01:00
Anatoly Bubenkov 002c517093 Fix unicode regex argumented steps issue, reimplements #75 2014-10-21 16:08:42 +00:00
Anatoly Bubenkov c6dc04386f Validation/generation helpers 2014-09-22 23:31:33 +00:00
Anatoly Bubenkov 5433bfeb61 Correct timing values for cucumber json reporting 2014-09-20 00:18:19 +00:00
Anatoly Bubenkov 8d28d15e52 Background support added. closes #16 2014-09-14 22:52:28 +00:00
Oleg Pidsadnyi 1748de1fe7 version bumped 2014-09-11 22:06:54 +02:00