[Reproducible-builds] [dh-python] 172/183: update tests to use python3.4
Jérémy Bobbio
lunar at moszumanska.debian.org
Fri Sep 19 15:30:35 UTC 2014
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch pu/reproducible_builds
in repository dh-python.
commit f3f09a809122d1b9fb3163ec2799b569ce22caf0
Author: Piotr Ożarowski <piotr at debian.org>
Date: Sun May 11 19:37:45 2014 +0200
update tests to use python3.4
---
dhpython/_defaults.py | 4 ++--
dhpython/interpreter.py | 14 +++++++-------
tests/Makefile | 4 ++--
tests/t304/Makefile | 6 +++---
tests/t304/foo.py | 4 ++--
tests/test_interpreter.py | 30 +++++++++++++++---------------
6 files changed, 31 insertions(+), 31 deletions(-)
diff --git a/dhpython/_defaults.py b/dhpython/_defaults.py
index b3b7e3e..9bd226d 100755
--- a/dhpython/_defaults.py
+++ b/dhpython/_defaults.py
@@ -27,11 +27,11 @@ from subprocess import Popen, PIPE
SUPPORTED = {
'cpython2': [(2, 7)],
- 'cpython3': [(3, 3)],
+ 'cpython3': [(3, 4)],
'pypy': [(2, 0)]}
DEFAULT = {
'cpython2': (2, 7),
- 'cpython3': (3, 3),
+ 'cpython3': (3, 4),
'pypy': (2, 0)}
log = logging.getLogger('dhpython')
diff --git a/dhpython/interpreter.py b/dhpython/interpreter.py
index 859dd2f..c15732f 100644
--- a/dhpython/interpreter.py
+++ b/dhpython/interpreter.py
@@ -309,8 +309,8 @@ class Interpreter:
>>> i = Interpreter('python')
>>> i.cache_file('foo.py', Version('3.1'))
'foo.pyc'
- >>> i.cache_file('bar/foo.py', '3.3')
- 'bar/__pycache__/foo.cpython-33.pyc'
+ >>> i.cache_file('bar/foo.py', '3.4')
+ 'bar/__pycache__/foo.cpython-34.pyc'
"""
version = Version(version or self.version)
last_char = 'o' if '-O' in self.options else 'c'
@@ -335,8 +335,8 @@ class Interpreter:
"""Return Python magic tag (used in __pycache__ dir to tag files).
>>> i = Interpreter('python')
- >>> i.magic_tag(version='3.3')
- 'cpython-33'
+ >>> i.magic_tag(version='3.4')
+ 'cpython-34'
"""
version = Version(version or self.version)
if self.impl.startswith('cpython') and version << Version('3.2'):
@@ -378,8 +378,8 @@ class Interpreter:
>>> Interpreter('python2.7').include_dir
'/usr/include/python2.7'
- >>> Interpreter('python3.3-dbg').include_dir
- '/usr/include/python3.3dm'
+ >>> Interpreter('python3.4-dbg').include_dir
+ '/usr/include/python3.4dm'
"""
if self.impl == 'pypy':
return '/usr/lib/pypy/include'
@@ -482,7 +482,7 @@ class Interpreter:
>>> Interpreter('python3.1').suggest_pkg_name('foo')
'python3-foo'
- >>> Interpreter('python3.3').suggest_pkg_name('foo')
+ >>> Interpreter('python3.4').suggest_pkg_name('foo')
'python3-foo'
>>> Interpreter('python2.7-dbg').suggest_pkg_name('bar')
'python-bar-dbg'
diff --git a/tests/Makefile b/tests/Makefile
index 1159f22..ff6588c 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -4,8 +4,8 @@
# Note that all these packages have to be installed during tests
export DEBPYTHON_DEFAULT=2.7
export DEBPYTHON_SUPPORTED=2.6,2.7
-export DEBPYTHON3_DEFAULT=3.3
-export DEBPYTHON3_SUPPORTED=3.2,3.3
+export DEBPYTHON3_DEFAULT=3.4
+export DEBPYTHON3_SUPPORTED=3.4
# enable or disable tests here:
TESTS := test101 test201 test202 test203 test204 test205 test206 test207 test301 test302 test303 test304
diff --git a/tests/t304/Makefile b/tests/t304/Makefile
index c9832bd..70c343a 100644
--- a/tests/t304/Makefile
+++ b/tests/t304/Makefile
@@ -6,10 +6,10 @@ clean: clean-common
check:
# python3.2 hardcoded via `dh_python3 --shebang ...python3.2`
grep -q '#! /usr/bin/python3.2 -OO' debian/foo/usr/share/baz32/baz.py
- # python3.3 hardcoded via shebang
- grep -q '/usr/share/foo \-V 3.3' debian/foo/DEBIAN/postinst
+ # python3.4 hardcoded via shebang
+ grep -q '/usr/share/foo \-V 3.4' debian/foo/DEBIAN/postinst
# /env removed from shebang
grep -q '#! /usr/bin/python3' debian/foo/usr/share/bar/bar.py
# /local removed from shebang
grep -q '#! /usr/bin/python3' debian/foo/usr/share/foo/baz.py
- grep -q '#! /usr/bin/python3.3' debian/foo/usr/share/foo/foo.py
+ grep -q '#! /usr/bin/python3.4' debian/foo/usr/share/foo/foo.py
diff --git a/tests/t304/foo.py b/tests/t304/foo.py
index 87f5575..fef29a7 100755
--- a/tests/t304/foo.py
+++ b/tests/t304/foo.py
@@ -1,2 +1,2 @@
-#!/usr/local/bin/python3.3
-"/usr/local/bin/python3.3 hardcoded in shebang"
+#!/usr/local/bin/python3.4
+"/usr/local/bin/python3.4 hardcoded in shebang"
diff --git a/tests/test_interpreter.py b/tests/test_interpreter.py
index 7078372..183d8e1 100644
--- a/tests/test_interpreter.py
+++ b/tests/test_interpreter.py
@@ -93,26 +93,26 @@ class TestInterpreter(unittest.TestCase):
self.assertIsNone(i.check_extname('foo.abi3.so'))
self.assertEqual(i.check_extname('foo/bar/bazmodule.so'), r'foo/bar/bazmodule.cpython-32dmu.so')
- @unittest.skipUnless(exists('/usr/bin/python3.3'), 'python3.3 is not installed')
- def test_python33(self):
- i = Interpreter('python3.3')
- self.assertEqual(i.soabi(), 'cpython-33m')
- self.assertEqual(i.check_extname('foo.so'), r'foo.cpython-33m-MYARCH.so')
+ @unittest.skipUnless(exists('/usr/bin/python3.4'), 'python3.4 is not installed')
+ def test_python34(self):
+ i = Interpreter('python3.4')
+ self.assertEqual(i.soabi(), 'cpython-34m')
+ self.assertEqual(i.check_extname('foo.so'), r'foo.cpython-34m-MYARCH.so')
self.assertIsNone(i.check_extname('foo.cpython-32m.so')) # different version
- self.assertIsNone(i.check_extname('foo.cpython-33m-OTHER.so')) # different architecture
- self.assertEqual(i.check_extname('foo.cpython-33m.so'), r'foo.cpython-33m-MYARCH.so')
+ self.assertIsNone(i.check_extname('foo.cpython-34m-OTHER.so')) # different architecture
+ self.assertEqual(i.check_extname('foo.cpython-34m.so'), r'foo.cpython-34m-MYARCH.so')
self.assertIsNone(i.check_extname('foo.abi3.so'))
- self.assertEqual(i.check_extname('foo/bar/bazmodule.so'), r'foo/bar/baz.cpython-33m-MYARCH.so')
+ self.assertEqual(i.check_extname('foo/bar/bazmodule.so'), r'foo/bar/baz.cpython-34m-MYARCH.so')
- @unittest.skipUnless(exists('/usr/bin/python3.3-dbg'), 'python3.3-dbg is not installed')
- def test_python33dbg(self):
- i = Interpreter('python3.3-dbg')
- self.assertEqual(i.soabi(), 'cpython-33dm')
- self.assertEqual(i.check_extname('foo.so'), r'foo.cpython-33dm-MYARCH.so')
+ @unittest.skipUnless(exists('/usr/bin/python3.4-dbg'), 'python3.4-dbg is not installed')
+ def test_python34dbg(self):
+ i = Interpreter('python3.4-dbg')
+ self.assertEqual(i.soabi(), 'cpython-34dm')
+ self.assertEqual(i.check_extname('foo.so'), r'foo.cpython-34dm-MYARCH.so')
self.assertIsNone(i.check_extname('foo.cpython-32m.so')) # different version
- self.assertIsNone(i.check_extname('foo.cpython-33m-OTHER.so')) # different architecture
+ self.assertIsNone(i.check_extname('foo.cpython-34m-OTHER.so')) # different architecture
self.assertIsNone(i.check_extname('foo.abi3.so'))
- self.assertEqual(i.check_extname('foo/bar/bazmodule.so'), r'foo/bar/baz.cpython-33dm-MYARCH.so')
+ self.assertEqual(i.check_extname('foo/bar/bazmodule.so'), r'foo/bar/baz.cpython-34dm-MYARCH.so')
def test_version(self):
i = Interpreter(impl='cpython2')
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dh-python.git
More information about the Reproducible-builds
mailing list