Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pytest fixtures to run dash. #1

Merged
merged 1 commit into from Oct 3, 2018
Merged

Add pytest fixtures to run dash. #1

merged 1 commit into from Oct 3, 2018

Conversation

T4rk1n
Copy link
Contributor

@T4rk1n T4rk1n commented Oct 3, 2018

Availables fixtures:

  • start_dash, start a dash app instance in a thread.
  • dash_from_file, use runpy to execute a file from a path, return the dash app instance contained in that file.
  • dash_app, combine dash_from_file and start_dash
  • percy_snapshot, take a percy snapshot.

All these fixtures are functions that needs to be call from the tests.

Example:

def test_usage(dash_app, selenium):
    app = dash_app('usage.py')
    output = selenium.find_element_by_id('output')
    assert output == 'my-value'
    ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant