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

bpo-10572: Move sqlite3 tests to Lib/test #29304

Merged
merged 18 commits into from
Oct 29, 2021

Conversation

erlend-aasland
Copy link
Contributor

@erlend-aasland erlend-aasland commented Oct 29, 2021

https://bugs.python.org/issue10572

Automerge-Triggered-By: GH:brettcannon

Erlend E. Aasland added 5 commits October 29, 2021 09:52
deleted Lib/sqlite3/test/__init__.py
renamed /test/test_sqlite.py -> Lib/test/test_sqlite3/__init__.py
renamed /sqlite3/test/test_backup.py -> Lib/test/test_sqlite3/test_backup.py
renamed /sqlite3/test/test_dbapi.py -> Lib/test/test_sqlite3/test_dbapi.py
renamed /sqlite3/test/test_dump.py -> Lib/test/test_sqlite3/test_dump.py
renamed /sqlite3/test/test_factory.py -> Lib/test/test_sqlite3/test_factory.py
renamed /sqlite3/test/test_hooks.py -> Lib/test/test_sqlite3/test_hooks.py
renamed /sqlite3/test/test_regression.py -> Lib/test/test_sqlite3/test_regression.py
renamed /sqlite3/test/test_transactions.py -> Lib/test/test_sqlite3/test_transactions.py
renamed /sqlite3/test/test_types.py -> Lib/test/test_sqlite3/test_types.py
renamed /sqlite3/test/test_userfunctions.py -> Lib/test/test_sqlite3/test_userfunctions.py
@erlend-aasland
Copy link
Contributor Author

After Serhiy's eminent cleanup in commit 3e19409, the main argument against moving the tests is now moot. Thanks to Serhiy's cleanup, moving the tests is now a much smaller PR than the previous attempt (GH-24148).

@erlend-aasland erlend-aasland requested a review from a team as a code owner October 29, 2021 08:45
Lib/test/test_sqlite3/__main__.py Outdated Show resolved Hide resolved
Lib/test/test_sqlite3/__main__.py Outdated Show resolved Hide resolved
Lib/test/test_sqlite3/__init__.py Outdated Show resolved Hide resolved
Lib/test/test_sqlite3/__init__.py Show resolved Hide resolved
@bedevere-bot
Copy link

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.

@erlend-aasland
Copy link
Contributor Author

I believe I have made the requested changes; please review again.

@bedevere-bot
Copy link

Thanks for making the requested changes!

@brettcannon: please review the changes made to this pull request.

Lib/test/test_sqlite3/__init__.py Outdated Show resolved Hide resolved
Lib/test/test_sqlite3/__init__.py Outdated Show resolved Hide resolved
Lib/test/test_sqlite3/__main__.py Outdated Show resolved Hide resolved
@brettcannon brettcannon self-requested a review October 29, 2021 21:45
@brettcannon
Copy link
Member

It all LGTM, I just want to double-check the tests still run, so I'm waiting on CI to finish at least one of the test runs. 😄

@miss-islington
Copy link
Contributor

@erlend-aasland: Status check is done, and it's a failure ❌ .

@miss-islington
Copy link
Contributor

@erlend-aasland: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit 62bf263 into python:main Oct 29, 2021
@erlend-aasland erlend-aasland deleted the sqlite-move-tests branch October 29, 2021 22:08
@erlend-aasland
Copy link
Contributor Author

Thanks, Brett!

@bedevere-bot
Copy link

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

Hi! The buildbot AMD64 Windows10 Pro 3.x has failed when building commit 62bf263.

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/596/builds/1321) and take a look at the build logs.
  4. Check if the failure is related to this commit (62bf263) 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/596/builds/1321

Failed tests:

  • test_os
  • test_regrtest

Failed subtests:

  • test_walk_bad_dir - test.test_os.BytesWalkTests

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

== Tests result: FAILURE then SUCCESS ==

395 tests OK.

10 slowest tests:

  • test_multiprocessing_spawn: 2 min 43 sec
  • test_peg_generator: 2 min 27 sec
  • test_unparse: 1 min 59 sec
  • test_concurrent_futures: 1 min 48 sec
  • test_tokenize: 1 min 39 sec
  • test_asyncio: 1 min 19 sec
  • test_lib2to3: 1 min 14 sec
  • test_unicodedata: 1 min 6 sec
  • test_distutils: 1 min 6 sec
  • test_capi: 1 min 5 sec

34 tests skipped:
test_curses test_dbm_gnu test_dbm_ndbm test_devpoll test_epoll
test_fcntl test_fork1 test_gdb test_grp test_ioctl test_kqueue
test_multiprocessing_fork test_multiprocessing_forkserver test_nis
test_openpty test_ossaudiodev test_pipes test_poll test_posix
test_pty test_pwd test_readline test_resource test_spwd
test_syslog test_threadsignals test_tix test_tk test_ttk_guionly
test_wait3 test_wait4 test_xxlimited test_xxtestfuzz
test_zipfile64

2 re-run tests:
test_os test_regrtest

1 test run no tests:
test_regrtest

Total duration: 15 min 30 sec

Click to see traceback logs
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\os_helper.py", line 396, in temp_dir
    yield path
    ^^^^^^^^^^
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\os_helper.py", line 449, in temp_cwd
    yield cwd_dir
    ^^^^^^^^^^^^^
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\libregrtest\main.py", line 658, in main
    self._main(tests, kwargs)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\libregrtest\main.py", line 731, in _main
    sys.exit(0)
    ^^^^^^^^^^^
SystemExit: 0


Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py", line 197, in _force_run
    return func(*args)
           ^^^^^^^^^^^
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\buildbot.python.org\\3.x.kloth-win64\\build\\build\\test_python_8352�\\test_python_worker_7008�'


Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
    ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\__main__.py", line 2, in <module>
    main()
    ^^^^^^
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\libregrtest\main.py", line 736, in main
    Regrtest().main(tests=tests, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\libregrtest\main.py", line 652, in main
    with os_helper.temp_cwd(test_cwd, quiet=True):
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\contextlib.py", line 155, in __exit__
    self.gen.throw(typ, value, traceback)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\os_helper.py", line 447, in temp_cwd
    with temp_dir(path=name, quiet=quiet) as temp_path:
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\contextlib.py", line 155, in __exit__
    self.gen.throw(typ, value, traceback)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\os_helper.py", line 401, in temp_dir
    rmtree(path)
    ^^^^^^^^^^^^
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\os_helper.py", line 358, in rmtree


Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_os.py", line 1428, in test_walk_bad_dir
    os.rename(path1, path1new)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [WinError 5] Access is denied: '@test_12176_tmp�\\TEST1\\SUB1' -> '@test_12176_tmp�\\TEST1\\SUB1.new'

@erlend-aasland
Copy link
Contributor Author

See GH-29327 for the buildbot fix.

@erlend-aasland
Copy link
Contributor Author

erlend-aasland commented Jul 19, 2022

We should consider mentioning this change in the 3.11 What's New document. Re #94998.

erlend-aasland added a commit to erlend-aasland/cpython that referenced this pull request Jul 20, 2022
@erlend-aasland
Copy link
Contributor Author

Proposed What's New entry in gh-95059.

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.

None yet

5 participants