File: python3-for-py3-tests

package info (click to toggle)
python-typing-extensions 3.7.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 336 kB
  • sloc: python: 3,250; sh: 9; makefile: 4
file content (18 lines) | stat: -rw-r--r-- 872 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
From: Michael R. Crusoe <michael.crusoe@gmail.com>
Forwarded: https://github.com/python/typing/pull/615
Subject: Run the tests using the current Python executable

Not whatever "python" might be.

--- python-typing-extensions.orig/src_py3/test_typing_extensions.py
+++ python-typing-extensions/src_py3/test_typing_extensions.py
@@ -1389,7 +1389,8 @@
         file_path = os.path.join(os.path.dirname(os.path.realpath(__file__)),
                                  'typing_extensions.py')
         try:
-            subprocess.check_output('python -OO {}'.format(file_path),
+            subprocess.check_output('{} -OO {}'.format(sys.executable,
+                                                       file_path),
                                     stderr=subprocess.STDOUT,
                                     shell=True)
         except subprocess.CalledProcessError: