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

Pytest fails to run on a seemingly innocent unit test #170

Open
ma-sadeghi opened this issue Jun 24, 2021 · 0 comments
Open

Pytest fails to run on a seemingly innocent unit test #170

ma-sadeghi opened this issue Jun 24, 2021 · 0 comments

Comments

@ma-sadeghi
Copy link

I have an ongoing PR on the pytest-split repo (a plugin for distributing unit tests) which adds better support for nbval. It basically ensures that all the cells within an IPython notebook belong to one (and only one) test group.

Anyway, I'm stuck writing unit tests for it as it keeps failing for some reason we can't decipher. Here's a minimal example:

def test_dummy1(example_suite):
    result = example_suite.inline_run("--nbval")
    assert len(_passed_test_names(result)) == 5

def test_dummy2(example_suite):
    result = example_suite.inline_run("--nbval")
    assert len(_passed_test_names(result)) == 5

The first test is successful, but the second one strangely fails. I'd really appreciate it if you could look into it and share your insight. Thanks!

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

No branches or pull requests

1 participant