Commits

Jakub Wilk committed da0704a

Don't hardcode Python versions.
Honour the PYTHON environment variable in the test runner.

  • Participants
  • Parent commits e1582bf

Comments (0)

Files changed (2)

-#!/usr/bin/python2.4
+#!/usr/bin/python
 
 import sys
 

File test_examples.py

 class test_examples:
 
 	abstract = True
+	python = os.getenv('PYTHON') or 'python'
 
 	def _compile(self, filename, output_filename=None):
 		if output_filename is None:
 			output_filename = self.executable
 		child = ipc.Popen(
-			['./jtc'] + self.jtc_args + [filename, '-o', self.executable],
+			[self.python, './jtc'] + self.jtc_args + [filename, '-o', self.executable],
 			stderr=ipc.PIPE
 		)
 		stderr = child.stderr.read()
 
 	abstract = False
 	jtc_args = ['-P']
-	runner = ['python2.4']
+	runner = [test_examples.python]
 
 # vim:ts=4 sw=4