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

test_pydoc test_synopsis_sourceless is a flaky test #67099

Closed
gpshead opened this issue Nov 21, 2014 · 3 comments
Closed

test_pydoc test_synopsis_sourceless is a flaky test #67099

gpshead opened this issue Nov 21, 2014 · 3 comments
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@gpshead
Copy link
Member

gpshead commented Nov 21, 2014

BPO 22910
Nosy @gpshead, @ericsnowcurrently, @koobs, @iritkatriel

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2021-12-07.18:02:31.070>
created_at = <Date 2014-11-21.07:03:41.765>
labels = ['type-bug', 'tests']
title = 'test_pydoc test_synopsis_sourceless is a flaky test'
updated_at = <Date 2021-12-07.18:02:31.069>
user = 'https://github.com/gpshead'

bugs.python.org fields:

activity = <Date 2021-12-07.18:02:31.069>
actor = 'gregory.p.smith'
assignee = 'none'
closed = True
closed_date = <Date 2021-12-07.18:02:31.070>
closer = 'gregory.p.smith'
components = ['Tests']
creation = <Date 2014-11-21.07:03:41.765>
creator = 'gregory.p.smith'
dependencies = []
files = []
hgrepos = []
issue_num = 22910
keywords = []
message_count = 3.0
messages = ['231465', '231469', '407937']
nosy_count = 4.0
nosy_names = ['gregory.p.smith', 'eric.snow', 'koobs', 'iritkatriel']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue22910'
versions = ['Python 3.4']

@gpshead
Copy link
Member Author

gpshead commented Nov 21, 2014

When running a parallel make -j12 test, test_pydoc fails reasonably often with:

test test_pydoc failed -- Traceback (most recent call last):
  File "/.../Lib/test/test_pydoc.py", line 556, in test_synopsis_sourceless   
    synopsis = pydoc.synopsis(filename)
  File "/.../Lib/pydoc.py", line 240, in synopsis
    mtime = os.stat(filename).st_mtime
FileNotFoundError: [Errno 2] No such file or directory: '/.../Lib/__pycache__/os.cpython-34.pyc'

Two other issues mention this failure as being introduced recently in comments:
http://bugs.python.org/issue20123 & http://bugs.python.org/issue20128

@gpshead gpshead self-assigned this Nov 21, 2014
@gpshead gpshead added tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Nov 21, 2014
@gpshead gpshead removed their assignment Nov 21, 2014
@gpshead
Copy link
Member Author

gpshead commented Nov 21, 2014

I suspect flakiness is due to parallel test execution. Is some other test possibly executing at the same time removing __pycache__ directories or .pyc files to recreate them (test_compileall?)? If the test were adjusted to point to a .py file of its own that it generates in a temporary directory that would avoid that.

@iritkatriel
Copy link
Member

Shall we close this? It's pretty old and if the test is still flaky it will let us know.

@gpshead gpshead closed this as completed Dec 7, 2021
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants