| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Teardown after test_taskName.
|
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Sorry, something went wrong.
| logging.logAsyncioTasks = False | ||
| runner.run(log_record(self.assertIsNone)) | ||
| finally: | ||
| asyncio.set_event_loop_policy(None) |
There was a problem hiding this comment.
Tearing down, else we end up with:
== Tests result: SUCCESS ==
406 tests OK.
1 test altered the execution environment:
test_logging
29 tests skipped:
test_curses test_dbm_gnu test_devpoll test_epoll test_gdb
test_idle test_ioctl test_launcher test_msilib
test_multiprocessing_fork test_ossaudiodev test_smtpnet
test_socketserver test_spwd test_ssl test_startfile test_tcl
test_tix test_tk test_ttk_guionly test_ttk_textonly test_turtle
test_urllib2net test_urllibnet test_winconsoleio test_winreg
test_winsound test_xmlrpc_net test_zipfile64
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
Minor refactor in LogRecord.__init__ as per suggestions. Fixed typo in docs.
There was a problem hiding this comment.
Just one suggested minor change, and one question.
Sorry, something went wrong.
| with open('test.log', encoding='utf-8') as f: | ||
| data = f.read().strip() | ||
| os.remove('test.log') | ||
| self.assertEqual('Task-1 - hello world', data) |
There was a problem hiding this comment.
How can we be sure the task name will always be Task-1? What if more asyncio tasks are added in other tests which run before this one? Will the numbering still start at 1?
Sorry, something went wrong.
There was a problem hiding this comment.
Have changed it to an assertRegex, similar to:
cpython/Lib/test/test_asyncio/test_tasks.py
Lines 393 to 394 in 1f134e9
Sorry, something went wrong.
…istent. Removed percent styling from News entry.
There was a problem hiding this comment.
The Azure pipeline check is failing - this is usually due to whitespace normalization issues. Can you please run make patchcheck and fixup anything that's found?
Sorry, something went wrong.
|
Pipelines looking green after pulling most recent main branch. |
Sorry, something went wrong.
| with open('test.log', encoding='utf-8') as f: | ||
| data = f.read().strip() | ||
| os.remove('test.log') | ||
| self.assertRegex(data, r'Task-\d+ - hello world') |
There was a problem hiding this comment.
handler = None
try:
...
finally:
asyncio.set_event_loop_policy(None)
if handler is not None:
handler.close()
if os.path.exists('test.log'):
....to prevent sub-exceptions in the finally block if there is an exception/assertion error in the try block ?
Sorry, something went wrong.
There was a problem hiding this comment.
I would have put the self.assertRegex(data, r'Task-\d+ - hello world') at the end of the try block too.
Sorry, something went wrong.
There was a problem hiding this comment.
Yes, that's a fair point. This test probably needs tidying up a little.
Sorry, something went wrong.
There was a problem hiding this comment.
I was following the pattern of the encoding tests above this one.
Happy to raise a new PR and fix it up along with the others.
Sorry, something went wrong.
There was a problem hiding this comment.
That's OK, I've just done it. I'm working on logging tests for something else.
Sorry, something went wrong.
There was a problem hiding this comment.
It's #93265.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
For: #91513
Continuing on from carlbordum@6e7dc2c 😃
Can test using: