summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2012-10-12 16:04:32 (GMT)
committerBenjamin Peterson <benjamin@python.org>2012-10-12 16:04:32 (GMT)
commit143d034ecd110f8543eba4ad76dfb6085cdaeb3d (patch)
tree9ddcfc6fe0d0cf8ce8558f88969bf1f9e98c1d25 /Lib
parentc3de6d63cd20cd26a288999d454124cb72eb57fe (diff)
parent7a9953edfbbd51dbda60ab31c0e5db5eea968b53 (diff)
downloadcpython-143d034ecd110f8543eba4ad76dfb6085cdaeb3d.zip
cpython-143d034ecd110f8543eba4ad76dfb6085cdaeb3d.tar.gz
cpython-143d034ecd110f8543eba4ad76dfb6085cdaeb3d.tar.bz2
merge 3.2
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/platform.py7
-rw-r--r--Lib/test/test_runpy.py4
-rw-r--r--Lib/test/test_timeit.py1
3 files changed, 9 insertions, 3 deletions
diff --git a/Lib/platform.py b/Lib/platform.py
index 769fe88..2b8a24a 100755
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -595,8 +595,13 @@ def win32_ver(release='',version='',csd='',ptype=''):
release = '7'
else:
release = '2008ServerR2'
+ elif min == 2:
+ if product_type == VER_NT_WORKSTATION:
+ release = '8'
+ else:
+ release = '2012Server'
else:
- release = 'post2008Server'
+ release = 'post2012Server'
else:
if not release:
diff --git a/Lib/test/test_runpy.py b/Lib/test/test_runpy.py
index 8b443f6..fefefc4 100644
--- a/Lib/test/test_runpy.py
+++ b/Lib/test/test_runpy.py
@@ -565,10 +565,10 @@ class RunPathTestCase(unittest.TestCase, CodeExecutionMixin):
with open(filename, 'w', encoding='latin1') as f:
f.write("""
#coding:latin1
-"non-ASCII: h\xe9"
+s = "non-ASCII: h\xe9"
""")
result = run_path(filename)
- self.assertEqual(result['__doc__'], "non-ASCII: h\xe9")
+ self.assertEqual(result['s'], "non-ASCII: h\xe9")
def test_main():
diff --git a/Lib/test/test_timeit.py b/Lib/test/test_timeit.py
index eb3b1a1..625fb8d 100644
--- a/Lib/test/test_timeit.py
+++ b/Lib/test/test_timeit.py
@@ -250,6 +250,7 @@ class TestTimeit(unittest.TestCase):
s = self.run_main(seconds_per_increment=60.0, switches=['-r-5'])
self.assertEqual(s, "10 loops, best of 1: 60 sec per loop\n")
+ @unittest.skipIf(sys.flags.optimize >= 2, "need __doc__")
def test_main_help(self):
s = self.run_main(switches=['-h'])
# Note: It's not clear that the trailing space was intended as part of