File: 10_test-target-py3.patch

package info (click to toggle)
py3cairo 1.10.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,308 kB
  • sloc: python: 12,287; ansic: 4,349; makefile: 141; sh: 32
file content (18 lines) | stat: -rw-r--r-- 772 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Description: Use all versions for py.test
 This patch changes py.test script to use all versions of Python 3 command
 instead of python.
Author: Koichi Akabe <vbkaisetsu@gmail.com>
Last-Update: <2012-04-12>

--- py3cairo-1.10.0+dfsg.orig/test/examples_test.py
+++ py3cairo-1.10.0+dfsg/test/examples_test.py
@@ -14,7 +14,8 @@ def test_snippets():
   examples/cairo_snippets/snippets/
   '''
   def doSnippets(name):
-    retcode = subprocess.call('python %s -s' % name, shell=True)
+    import sys
+    retcode = subprocess.call('PYTHONPATH=../../test python%d.%d %s -s' % (sys.version_info[0], sys.version_info[1], name), shell=True)
     assert retcode == 0, 'Error: retcode == {0}'.format(retcode)
 
   os.chdir(os.path.join(os.path.dirname(__file__), '..', 'examples',