From 903bd9bee55bcc404ae39a94d2625814d5bcc2a3 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Tue, 1 Nov 2016 12:27:56 -0400 Subject: [PATCH] Use a shebang for the main test executable. This replaces the "python test/" call with "./test/__main__py". It may seem like a pointless change, but the former will always use whatever "python" points to, and the latter will use the contents of the shebang in "__main__.py". Distributions can fix the shebang on that one file to ensure that the test suite is run with the proper version of python. --- TODO | 2 -- makefile | 2 +- test/__main__.py | 1 + 3 files changed, 2 insertions(+), 3 deletions(-) mode change 100644 => 100755 test/__main__.py diff --git a/TODO b/TODO index 6439ce7..21b47eb 100644 --- a/TODO +++ b/TODO @@ -140,8 +140,6 @@ 8. Fix floating point comparisons in the doctest output. -9. Use shebang in the standalone test executable. - 10. Sometimes our Lyapunov-like tests over the ice cream cone are failing badly. For example, diff --git a/makefile b/makefile index aedc342..8eb2751 100644 --- a/makefile +++ b/makefile @@ -14,7 +14,7 @@ doctest: .PHONY: check check: - PYTHONPATH="." python test/ + PYTHONPATH="." test/__main__.py .PHONY: lint lint: diff --git a/test/__main__.py b/test/__main__.py old mode 100644 new mode 100755 index 26dfc57..8d88f64 --- a/test/__main__.py +++ b/test/__main__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python """ An implementation of __main__() that allows us to "run this module." """ -- 2.43.2