Skip to content

[3.11] gh-112186: Improve test case test_loop_is_closed_resource_warnings (GH-112187) #112261

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

Closed
wants to merge 1 commit into from

Conversation

dpr-0
Copy link
Contributor

@dpr-0 dpr-0 commented Nov 19, 2023

(cherry picked from commit 18c6929)

Co-authored-by: DPR dpr-0xff@pm.me

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

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

Your test fails. Here's more detailed output:

~/3.11$ ./python.exe -m test test_asyncio.test_streams -v -m test_unclosed_resource_warnings
== CPython 3.11.6+ (heads/backport-18c6929-3.11:5f3cbff10ee, Nov 19 2023, 11:58:49) [Clang 15.0.0 (clang-1500.0.40.1)]
== macOS-13.6.1-x86_64-i386-64bit little-endian
== Python build: debug ASAN
== cwd: /Users/guido/3.11/build/test_python_worker_67267æ
== CPU count: 12
== encodings: locale=UTF-8 FS=utf-8
== resources: all test resources are disabled, use -u option to unskip tests
== sanitizers: address

Using random seed: 1128342355
0:00:00 load avg: 3.40 Run 1 test sequentially
0:00:00 load avg: 3.40 [1/1] test_asyncio.test_streams
test_unclosed_resource_warnings (test.test_asyncio.test_streams.StreamTests.test_unclosed_resource_warnings) ... FAIL

======================================================================
FAIL: test_unclosed_resource_warnings (test.test_asyncio.test_streams.StreamTests.test_unclosed_resource_warnings)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/guido/3.11/Lib/test/test_asyncio/test_streams.py", line 1089, in test_unclosed_resource_warnings
    self.loop.run_until_complete(inner(httpd))
  File "/Users/guido/3.11/Lib/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/Users/guido/3.11/Lib/test/test_asyncio/test_streams.py", line 1082, in inner
    self.assertEqual(len(cm.warnings), 1)
AssertionError: 0 != 1

----------------------------------------------------------------------
Ran 1 test in 0.080s

FAILED (failures=1)
test test_asyncio.test_streams failed
test_asyncio.test_streams failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_asyncio.test_streams

Total duration: 549 ms
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
~/3.11$ 

@bedevere-app
Copy link

bedevere-app bot commented Nov 19, 2023

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@gvanrossum
Copy link
Member

(Honestly it looks like you forgot to add the fix to streams.py to the backport PR here.)

@dpr-0
Copy link
Contributor Author

dpr-0 commented Nov 20, 2023

(Honestly it looks like you forgot to add the fix to streams.py to the backport PR here.)

I see, but should I wait #112141 this merge first?

@gvanrossum
Copy link
Member

I see, but should I wait #112141 this merge first?

It looks like the multiverse forked in a weird way. :-)

Both PRs propose a version of the same test -- (unless they are identical, I haven't checked).

Assuming this PR has an improved version of the test, the best thing to do would be to copy this version of the test back into the earlier PR, commit the changes, and re-push it. (Try not to rebase or force-push, that just makes the review more confusing.) We can then merge #112141 and we can close this one (#112186).

@dpr-0 dpr-0 closed this Nov 21, 2023
@dpr-0 dpr-0 deleted the backport-18c6929-3.11 branch November 21, 2023 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting changes skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants