Commit Graph

17 Commits

Author SHA1 Message Date
David Röthlisberger c8677a7783 tests: Use `pytester` fixture instead of `testdir`
`testdir` is deprecated. It's identical to `pytester`, except that
`testdir` returns `py.path` objects whereas `pytester` returns Python
stdlib `Path` objects. So I had to update usages of those paths.

`pytester` was added in pytest 6.2, which is our minimum supported
version.
2022-11-04 08:53:07 +00:00
Alessio Bogon 18c05bf92b Remove pytest<6 support logic 2022-07-26 00:20:31 +02:00
Alessio Bogon 478e21bcdf Use `_` as step function name. It should not matter what the name is.
Inspired by the `ward` testing framework
2022-07-10 17:41:12 +02:00
Alessio Bogon 5fad41f353 Only parse angular brackets in steps only for "Scenario Outline"s 2022-07-03 22:54:08 +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 0408218680 Use compatibility function to assert outcomes 2020-09-05 19:05:57 +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 2226128936
Remove code that rewrites code (#309)
* Stop testing for old pytest and python versions

* Switch from pytest-pep8 to pycodestyle.

Pytest-pep8 received the last update in 2014, and it is now not working with pytest >= 4.5

* Explicitly state used markers

* Remove supposedly useless test

* Fix pytest missing markers definitions

* Fix pytest missing markers definitions

* Fix wrong command line usage

* Remove compatibility with ancient pytest

* Be more lenient when checking for failed test string

* Remove dead code
2019-08-20 10:49:20 +02:00
Anatoly Bubenkov 831d2122dc increase test coverage 2015-06-24 01:17:34 +02:00
Anatoly Bubenkov 24684bfb82 Fixed FeatureError string representation to correctly support python3. closes #115 2015-06-04 10:29:18 +02:00
Leonardo Santagada 41acbf4148 better parsing of comments, fix #99 2015-03-15 12:19:52 -03:00
Anatoly Bubenkov 771f263ec6 Better reporting of a not found scenario 2014-09-18 18:32:50 +00:00
Anatoly Bubenkov dbe3f9da31 allow empty example values 2014-03-27 11:54:12 +01:00
Anatoly Bubenkov 482482b059 code cleanup. vertical example table implemented 2014-03-15 01:05:21 +01:00
Anatoly Bubenkov e3e4cb6ad2 Scenario outline implementation based on pure pytest parametrization 2014-03-13 18:33:53 +01:00
Anatoly Bubenkov f05045c15d Scenario parametrization implemented. Coveralls integration. Coverage improvement 2013-08-10 03:32:25 +02:00