Skip to content

[Feature Request]: Moving example into tests #443

@jmmshn

Description

@jmmshn

Problem

Currently our coverage is a bit poor and it's going to lead to problems.

I think the testing within the dash ecosystem is good enough that we can convert all the examples into tests and achieve significant coverage with very little new added code.

@mkhorton , @janosh let me know if this makes sense.

Proposed Solution

I'm proposing that we do something like this:

  • Move the examples to root level, I'll leave a README there or something.
  • Add the examples path to the conftest
  • Make test functions like this:
# tests/test_example_apps.py
import pytest
from example_apps.app1 import app as app1
from example_apps.app2 import app as app2

def test_app1(dash_duo):
    # Use the app instance directly
    dash_duo.start_server(app1)

Alternatives

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTest all the things!

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions