Skip to main content

Package to parse inline tables for use with pytest-bdd.

Project description

Table Parser

Intended to be used with pytest_bdd for parsing inline tables from str into dict

Example:

Given I have a thing
When I do stuff:
    | Heading | Other Heading |
    | to do   | Also          |
    | more    | Other         |
Then everything is great
from pytest_bdd import when, parsers
from table_parser.table_parser import table_parser

@when(parsers.cfparse('I do stuff:\n{table}'))
def verify_date_from_request(table):
    table_dict = table_parser(table)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bbd-table-parser-0.0.1.tar.gz (2.1 kB view hashes)

Uploaded Source

Built Distribution

bbd_table_parser-0.0.1-py3-none-any.whl (3.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page