classification
Title: Lib/test/test_dataclasses.py failed when ran as a script
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.8, Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: eric.smith, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2018-07-21 17:47 by serhiy.storchaka, last changed 2018-07-23 22:05 by serhiy.storchaka. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 8382 merged serhiy.storchaka, 2018-07-21 17:48
PR 8421 merged miss-islington, 2018-07-23 20:38
Messages (3)
msg322113 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-07-21 17:47
$ ./python Lib/test/test_dataclasses.py
...
======================================================================
ERROR: test_classvar_module_level_import (__main__.TestStringAnnotations)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_dataclasses.py", line 2716, in test_classvar_module_level_import
    from . import dataclass_module_1
ImportError: cannot import name 'dataclass_module_1' from '__main__' (Lib/test/test_dataclasses.py)

======================================================================
FAIL: test_no_repr (__main__.TestRepr)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_dataclasses.py", line 1970, in test_no_repr
    repr(C(3)))
AssertionError: 'test_dataclasses.TestRepr.test_no_repr.<locals>.C object at' not found in '<__main__.TestRepr.test_no_repr.<locals>.C object at 0x7f11745df2c8>'

----------------------------------------------------------------------
msg322254 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-07-23 20:37
New changeset 3fe5cccb08283f5f4817ac432560972a4c0f5290 by Serhiy Storchaka in branch 'master':
bpo-34184: Fix running Lib/test/test_dataclasses.py as a script. (GH-8382)
https://github.com/python/cpython/commit/3fe5cccb08283f5f4817ac432560972a4c0f5290
msg322259 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-07-23 21:25
New changeset 635338248f967728f13b7bc4b9969aedff51eef6 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7':
bpo-34184: Fix running Lib/test/test_dataclasses.py as a script. (GH-8382) (GH-8421)
https://github.com/python/cpython/commit/635338248f967728f13b7bc4b9969aedff51eef6
History
Date User Action Args
2018-07-28 19:30:52serhiy.storchakalinkissue34265 superseder
2018-07-23 22:05:18serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2018-07-23 21:25:13serhiy.storchakasetmessages: + msg322259
2018-07-23 20:38:06miss-islingtonsetpull_requests: + pull_request7947
2018-07-23 20:37:58serhiy.storchakasetmessages: + msg322254
2018-07-21 17:48:45serhiy.storchakasetkeywords: + patch
stage: patch review
pull_requests: + pull_request7912
2018-07-21 17:47:26serhiy.storchakacreate