Skip to content

Avoid crash for sybil doctests#174

Merged
ngoldbaum merged 4 commits into
Quansight-Labs:mainfrom
ngoldbaum:avoid-crash
May 21, 2026
Merged

Avoid crash for sybil doctests#174
ngoldbaum merged 4 commits into
Quansight-Labs:mainfrom
ngoldbaum:avoid-crash

Conversation

@ngoldbaum

Copy link
Copy Markdown
Collaborator

Fixes #172.

@ngoldbaum ngoldbaum changed the title Avoid crash Avoid crash for sybil doctests May 19, 2026

@itamarst itamarst left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with original reproducer, it fixes the problem there too. Two minor changes, and then seems fine to merge.

Comment thread tests/test_run_parallel.py Outdated
assert result.parseoutcomes()["warnings"] == 1


def test_incompatible_test_item_2(pytester):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is almost identical to the next one in the file, so at first glance it's not clear how it differs. Eventually on third reading I noticed the self._parallel_custom_item = True in test_known_incompatible_test_item_doesnt_warn, but it took a while.

(I am, to be fair, extremely sleep deprived so not at my cognitive best, but perhaps that's a reasonable stand-in for "maintainer in the future who hasn't looked at the code in 12 months".)

It would therefore be helpful if this test and the next had docstrings explaining the specific behavior they are trying to check.

"*::test_incompatible_item PASSED*",
]
)
assert result.parseoutcomes()["warnings"] == 1

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be useful to check the content of the warning.

@ngoldbaum

Copy link
Copy Markdown
Collaborator Author

Thanks for taking a look!

@ngoldbaum ngoldbaum merged commit 9bb1215 into Quansight-Labs:main May 21, 2026
11 checks passed
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.

INTERNALERROR: 'NoneType' object has no attribute '__globals__' when collecting non-Function items (e.g. sybil-driven docs tests)

2 participants