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 Ivan.Pozdeev
Recipients Ivan.Pozdeev
Date 2019-03-01.18:39:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1551465560.76.0.129130673812.issue36160@roundup.psfhosted.org>
In-reply-to
Content
Sample failure:

> cpython\branches\3.7>python.bat -m test.test_site

Running Debug|x64 interpreter...
EEEEEEEEEEEEE.s.............
======================================================================
ERROR: test_addpackage (__main__.HelperFunctionsTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\Sasha\Documents\cpython\branches\3.7\lib\test\test_site.py", li
ne 77, in tearDown
    sysconfig._CONFIG_VARS.clear()
AttributeError: 'NoneType' object has no attribute 'clear'

======================================================================
ERROR: test_addpackage_import_bad_exec (__main__.HelperFunctionsTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\Sasha\Documents\cpython\branches\3.7\lib\test\test_site.py", li
ne 77, in tearDown
    sysconfig._CONFIG_VARS.clear()
AttributeError: 'NoneType' object has no attribute 'clear'

<etc>

The reason is that `sysconfig._CONFIG_VARS' is None until the first call to `sysconfig.get_config_vars()'. When the suite is used in conjunction with the others, other tests have already called it by the time test_site.py gets control.
History
Date User Action Args
2019-03-01 18:39:20Ivan.Pozdeevsetrecipients: + Ivan.Pozdeev
2019-03-01 18:39:20Ivan.Pozdeevsetmessageid: <1551465560.76.0.129130673812.issue36160@roundup.psfhosted.org>
2019-03-01 18:39:20Ivan.Pozdeevlinkissue36160 messages
2019-03-01 18:39:20Ivan.Pozdeevcreate