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

gh-93649: Split memory and docstring tests from _testcapimodule.c #99517

Merged
merged 2 commits into from
Nov 16, 2022

Conversation

erlend-aasland
Copy link
Contributor

@erlend-aasland
Copy link
Contributor Author

erlend-aasland commented Nov 15, 2022

Should we also add the three tracemalloc tests to Modules/_testcapi/mem.c?

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM.

I suggest to rename "mem.c" to "pymem.c", since most tests are about the "PyMem" API: https://docs.python.org/dev/c-api/memory.html

But I'm also fine with "mem" name, it's up to you.

@erlend-aasland
Copy link
Contributor Author

I think I prefer the "mem" name, but I'm not sure it matters much really. What do you think about including the tracemalloc tests?

@erlend-aasland erlend-aasland merged commit 00437ad into python:main Nov 16, 2022
@erlend-aasland erlend-aasland deleted the split-testcapi/docstring branch November 16, 2022 13:09
@erlend-aasland
Copy link
Contributor Author

I think I prefer the "mem" name, but I'm not sure it matters much really. What do you think about including the tracemalloc tests?

We can add the tracemalloc tests later if we find out they should live in Modules/_testcapi/mem.c

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot wasm32-emscripten node (dynamic linking) 3.x has failed when building commit 00437ad.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/1056/builds/852) and take a look at the build logs.
  4. Check if the failure is related to this commit (00437ad) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/1056/builds/852

Failed tests:

  • test___all__

Failed subtests:

  • test_all - test.test___all__.AllTest.test_all

Summary of the results of the build (if available):

== Tests result: FAILURE ==

334 tests OK.

10 slowest tests:

  • test_tokenize: 57.6 sec
  • test_lib2to3: 44.8 sec
  • test_unparse: 41.9 sec
  • test_capi: 32.1 sec
  • test_argparse: 19.9 sec
  • test_statistics: 17.0 sec
  • test_unicodedata: 16.2 sec
  • test_pickle: 13.2 sec
  • test_zipfile: 12.6 sec
  • test_decimal: 11.3 sec

1 test failed:
test___all__

98 tests skipped:
test__xxsubinterpreters test_asyncgen test_asyncio
test_check_c_globals test_clinic test_cmd_line
test_concurrent_futures test_contextlib_async test_ctypes
test_curses test_dbm_gnu test_dbm_ndbm test_devpoll test_doctest
test_docxmlrpc test_dtrace test_embed test_epoll test_faulthandler
test_fcntl test_file_eintr test_fork1 test_ftplib test_gdb
test_grp test_httplib test_httpservers test_idle test_imaplib
test_interpreters test_ioctl test_kqueue test_launcher test_lzma
test_mmap test_msilib test_multiprocessing_fork
test_multiprocessing_forkserver test_multiprocessing_main_handling
test_multiprocessing_spawn test_nis test_openpty test_ossaudiodev
test_pdb test_peg_generator test_perf_profiler test_poll
test_poplib test_pty test_pwd test_queue test_readline
test_regrtest test_repl test_resource test_select test_selectors
test_smtplib test_smtpnet test_socket test_socketserver test_spwd
test_ssl test_stable_abi_ctypes test_startfile test_subprocess
test_sys_settrace test_syslog test_tcl test_telnetlib test_thread
test_threadedtempfile test_threading test_threading_local test_tix
test_tkinter test_tools test_ttk test_ttk_textonly test_turtle
test_urllib2 test_urllib2_localnet test_urllib2net test_urllibnet
test_venv test_wait3 test_wait4 test_webbrowser test_winconsoleio
test_winreg test_winsound test_wmi test_wsgiref test_xmlrpc
test_xmlrpc_net test_zipfile64 test_zipimport_support
test_zoneinfo
0:19:49 load avg: 12.38
0:19:49 load avg: 12.38 Re-running failed tests is not supported with --python host runner option.

Total duration: 19 min 49 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/opt/buildbot/bcannon-wasm/3.x.bcannon-wasm.emscripten-node-dl/build/Lib/test/test___all__.py", line 129, in test_all
    self.check_all(modname)
  File "/opt/buildbot/bcannon-wasm/3.x.bcannon-wasm.emscripten-node-dl/build/Lib/test/test___all__.py", line 43, in check_all
    with warnings_helper.check_warnings(
  File "/opt/buildbot/bcannon-wasm/3.x.bcannon-wasm.emscripten-node-dl/build/Lib/contextlib.py", line 144, in __exit__
    next(self.gen)
  File "/opt/buildbot/bcannon-wasm/3.x.bcannon-wasm.emscripten-node-dl/build/Lib/test/support/warnings_helper.py", line 185, in _filterwarnings
    raise AssertionError("unhandled warning %s" % reraise[0])
AssertionError: unhandled warning {message : SyntaxWarning("invalid escape sequence '\\('"), category : 'SyntaxWarning', filename : '/opt/buildbot/bcannon-wasm/3.x.bcannon-wasm.emscripten-node-dl/build/Lib/test/test_enum.py', lineno : 1481, line : None}

@sobolevn
Copy link
Member

@erlend-aasland can you please review my fix of this failure? It happens for each PR right now :(

Link: #99519

@vstinner
Copy link
Member

What do you think about including the tracemalloc tests?

Yep, it makes sense to move them in mem.c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants