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

[Feature Request]: Moving example into tests #443

Open
jmmshn opened this issue Jan 18, 2025 · 1 comment
Open

[Feature Request]: Moving example into tests #443

jmmshn opened this issue Jan 18, 2025 · 1 comment
Labels
tests Test all the things!

Comments

@jmmshn
Copy link
Collaborator

jmmshn commented Jan 18, 2025

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

@janosh
Copy link
Member

janosh commented Jan 18, 2025

yes, that definitely makes sense! 👍 i remember taking a brief look at doing this as part of #362 but didn't follow through. perhaps worth linking this related PR janosh/pymatviz#164 by @DanielYang59 as well

@janosh janosh added the tests Test all the things! label Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Test all the things!
Projects
None yet
Development

No branches or pull requests

2 participants