Python pytest_bdd.when() Examples
The following are 3
code examples of pytest_bdd.when().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
pytest_bdd
, or try the search function
.
Example #1
Source File: test_db.py From wiki-scripts with GNU General Public License v3.0 | 5 votes |
def _check_allrevisions(mediawiki, db): prop = {"ids", "flags", "timestamp", "user", "userid", "size", "sha1", "contentmodel", "comment", "content", "tags"} api_params = { "list": "allrevisions", "arvprop": "|".join(prop), "arvlimit": "max", } api_list = list(mediawiki.api.list(api_params)) db_list = list(db.query(list="allrevisions", arvprop=prop)) # FIXME: hack until we have per-page grouping like MediaWiki api_revisions = [] for page in api_list: for rev in page["revisions"]: rev["pageid"] = page["pageid"] rev["ns"] = page["ns"] rev["title"] = page["title"] api_revisions.append(rev) api_revisions.sort(key=lambda item: item["revid"], reverse=True) api_list = api_revisions # FIXME: WTF, MediaWiki does not restore rev_parent_id when undeleting... # https://phabricator.wikimedia.org/T183375 for rev in db_list: del rev["parentid"] for rev in api_list: del rev["parentid"] assert db_list == api_list
Example #2
Source File: test_restart.py From pylada-light with GNU General Public License v3.0 | 5 votes |
def passon(): """ A container to pass information from when to then """ return []
Example #3
Source File: test_single_run.py From pylada-light with GNU General Public License v3.0 | 5 votes |
def passon(): """ A container to pass information from when to then """ return []