mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
Issue #25985: sys.version_info is now used instead of sys.version
to format short Python version.
This commit is contained in:
parent
a9725f86a9
commit
885bdc4946
24 changed files with 56 additions and 52 deletions
|
@ -238,13 +238,14 @@ class HelperFunctionsTests(unittest.TestCase):
|
|||
self.assertEqual(len(dirs), 2)
|
||||
wanted = os.path.join('/Library',
|
||||
sysconfig.get_config_var("PYTHONFRAMEWORK"),
|
||||
sys.version[:3],
|
||||
'%d.%d' % sys.version_info[:2],
|
||||
'site-packages')
|
||||
self.assertEqual(dirs[1], wanted)
|
||||
elif os.sep == '/':
|
||||
# OS X non-framwework builds, Linux, FreeBSD, etc
|
||||
self.assertEqual(len(dirs), 1)
|
||||
wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
|
||||
wanted = os.path.join('xoxo', 'lib',
|
||||
'python%d.%d' % sys.version_info[:2],
|
||||
'site-packages')
|
||||
self.assertEqual(dirs[0], wanted)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue