Commit Graph

41 Commits

Author SHA1 Message Date
Alessio Bogon 3e49f3b6df Fix types 2022-02-24 16:53:27 +01:00
Alessio Bogon 4ddb257230 Get `pytest tests/` to work again 2021-10-01 20:51:59 +02:00
Alessio Bogon 7ab5aeeb2a Blindly add annotations using pyannotate. A lot to fix.
Commands run:
```
pytest tests/
pyannotate --py3 -w pytest_bdd tests
git add pytest_bdd tests
pre-commit run
```
2021-10-01 20:17:43 +02: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
Alessio Bogon e76c0cd68d Trim whitespaces (pre-commit run --all-files) 2021-04-27 10:26:07 +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
Alessio Bogon 093e0a0855 Simplify test 2021-04-15 10:48:59 +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
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 fc9adba38b Blackify code 2020-09-05 20:17:25 +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 6047a35ef1 Apply `black` formatter to the codebase 2019-08-27 17:54:58 +02:00
Alessio Bogon fa9fb67d39 Fix wrong command line usage 2019-07-05 15:14:58 +02:00
Alessio Bogon e06156b5dc Fix pytest missing markers definitions 2019-07-05 15:14:58 +02:00
Alessio Bogon 1f095c3713 pep8 2019-07-05 15:14:58 +02:00
Alessio Bogon 545c6ca5b0 Explicitly state used markers 2019-07-05 15:14:58 +02:00
Michiel Holtkamp 2ab960a626 Fill in step names in cucumber report.
According to [1], when the outline scenarios are
reported in 'expand' mode, all the outlines will
be expanded to scenarios with their test results.
Also, the step name parameters are filled in.

This is a different mode than without 'expand'
mode[2], where the scenario outlines are reported
so the step names are not filled in and there are
no test results. The "examples" are reported in
this mode.

Since pytest-bdd does report the results of each
step of an outline scenario as separate scenarios,
it looks more like the 'expand' mode, so I've
added the filling in of the parameters in the
step names to make it more compliant.

[1] https://relishapp.com/cucumber/cucumber/docs/formatters/json-output-formatter#scenario-outline-expanded
[2] https://relishapp.com/cucumber/cucumber/docs/formatters/json-output-formatter#scenario-outline
2017-11-03 12:38:03 +01:00
Bruno Oliveira 7f16bc93ea Last pytest 3.0 compatibility fixes 2016-08-19 16:47:56 +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 5433bfeb61 Correct timing values for cucumber json reporting 2014-09-20 00:18:19 +00:00
Anatoly Bubenkov 0dd249c999 cucumber json timings added 2014-09-10 23:24:14 +00:00
Anatoly Bubenkov 7fcfb20f33 implemented cucumber tags 2014-07-27 13:31:38 +00:00
Anatoly Bubenkov 6e80100ae0 multiple steps instead of one 2014-07-26 12:37:55 +00:00
Anatoly Bubenkov 5aaf42e4b5 better reporting 2014-07-25 22:17:58 +02:00
Anatoly Bubenkov 3f5da0f4a0 pep fixes 2014-05-11 17:02:11 +02:00
Anatoly Bubenkov 34a4ac65dd Merge branch 'cucumber-json-formatter' of github.com:albertjan/pytest-bdd into cucumber-json-formatter 2014-05-11 16:47:59 +02:00
Anatoly Bubenkov 62898e5a00 PR 2014-05-11 16:47:37 +02:00
albertjan d740515a9f clean up and use rel path 2014-05-11 16:43:45 +02:00
Anatoly Bubenkov be87dffccb fix failing test 2014-05-11 16:36:17 +02:00
albertjan 9c196534f5 corrects the reference 2014-05-11 16:19:32 +02:00
albertjan faa5ececc1 corrects the reference 2014-05-11 16:15:11 +02:00
albertjan 504d722864 makes the keyword nice 2014-05-11 16:05:13 +02:00
Anatoly Bubenkov cb6db6fb4a Merge branch 'cucumber-json-formatter' of github.com:albertjan/pytest-bdd into cucumber-json-formatter 2014-05-11 15:52:27 +02:00
Anatoly Bubenkov aa81fea6c0 correct expectation 2014-05-11 15:52:18 +02:00
albertjan 1f62168f1f add feature hash 2014-05-11 15:39:29 +02:00
Anatoly Bubenkov 127cba2d4e equals_any added 2014-05-11 15:26:10 +02:00
albertjan 3d10266894 Merge branch 'cucumber-json-formatter' of https://github.com/paylogic/pytest-bdd into cucumber-json-formatter 2014-05-11 13:18:48 +02:00
Anatoly Bubenkov fd16428ab7 store item in the report 2014-05-11 13:18:43 +02:00
Anatoly Bubenkov c22464f01a fix test 2014-05-11 11:26:18 +02:00
albertjan c9b509a296 correct func name 2014-05-11 11:21:09 +02:00
Anatoly Bubenkov 3b60a9e0e5 start implementing cucumber json 2014-04-09 00:40:30 +02:00