This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kayhayen
Recipients kayhayen
Date 2018-07-28.16:01:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1532793696.91.0.56676864532.issue34265@psf.upfronthosting.co.za>
In-reply-to
Content
When I run:

python3.7 test/test_dataclasses.py

======================================================================
ERROR: test_classvar_module_level_import (__main__.TestStringAnnotations)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hayen/repos/Py2C/tests/CPython37/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__' (/home/hayen/repos/Py2C/tests/CPython37/test/test_dataclasses.py)

======================================================================
FAIL: test_no_repr (__main__.TestRepr)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hayen/repos/Py2C/tests/CPython37/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 0x7f6a2d4ffd68>'

The relative imports cannot work, as the main program is not in the test package. Also it has the name __main__ not the module name in repr.

As Guido said in another bug report, tests are expected to pass. Can you please adapt them?

I hope "Library" is proper component, as tests are below it.

Thanks,
Kay
History
Date User Action Args
2018-07-28 16:01:36kayhayensetrecipients: + kayhayen
2018-07-28 16:01:36kayhayensetmessageid: <1532793696.91.0.56676864532.issue34265@psf.upfronthosting.co.za>
2018-07-28 16:01:36kayhayenlinkissue34265 messages
2018-07-28 16:01:36kayhayencreate