Repository navigation
Collect the two DoH3 tests whose names start with a capital T - #1400
Merged
rthalley merged 1 commit intoNov 4, 2026
Merged
Conversation
`TestDoH3PostRequest` and `TestDoH3QueryIP` are spelled with a capital T,
so neither unittest nor pytest collects them. Their sibling three lines
above is `testDoH3GetRequest`, which does run, and the whole `AsyncTests`
class is already gated on internet reachability and on aioquic being
present, so reviving these adds no new kind of test.
`TestDoH3QueryIP` also lost the `await` on its `dns.asyncquery.https`
call, which is why renaming it alone fails with
AttributeError: 'coroutine' object has no attribute 'flags'
Add the `await` so the test checks the response it meant to check.
tests/test_async.py goes from 83 collected to 87, since AsyncTests is also
re-run as TrioAsyncTests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tests/test_async.pyhas three DoH3 tests next to each other:The first runs. The other two are spelled with a capital
T, so neitherunittest nor pytest collects them, and they have never run.
Reviving them does not change what the suite reaches out to.
AsyncTestsis already gated by
@unittest.skipIf(not tests.util.is_internet_reachable()),each of the three carries
@unittest.skipIf(not dns.quic.have_quic)and@tests.util.retry_on_timeout, andtestDoH3GetRequestalready queries apublic DoH3 resolver.
The second one does not pass on a rename alone
TestDoH3QueryIPis missing theawaitthat both of its siblings have:So
ris a coroutine and the assertion fails:This adds the
await, so the test checks the response rather than thecoroutine object.
Verification
With
aioquicinstalled and the internet reachable:tests/test_async.pycollects 83 tests before and 87 after. The four arethe two methods times
AsyncTestsandTrioAsyncTests, which subclasses it.await, gives 2 failed and 4 passed on-k DoH3, and both failures aretestDoH3QueryIP.await,-k DoH3is 6 passed.tests/test_async.pyas a whole is 81 passed, 6 skipped.identical before and after on
5adedf1a, intest_zone.pyandtest_tsig_doh_doq.py, so they are unrelated to this change.black --check tests/test_async.pyis clean.