File pr_956.patch of Package python-django_compressor
From 87c00d0cd0a19196e2ceae45d850fa053121067a Mon Sep 17 00:00:00 2001
From: John Vandenberg <jayvdb@gmail.com>
Date: Sat, 14 Sep 2019 17:48:14 +0700
Subject: [PATCH] test_base: Use sys.executable
---
compressor/tests/test_base.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/compressor/tests/test_base.py b/compressor/tests/test_base.py
index 7418047a..fcbcf13b 100644
--- a/compressor/tests/test_base.py
+++ b/compressor/tests/test_base.py
@@ -1,6 +1,7 @@
from __future__ import with_statement, unicode_literals
import os
import re
+import sys
from tempfile import mkdtemp
from shutil import rmtree, copytree
@@ -317,7 +318,7 @@ def test_avoid_reordering_css(self):
self.assertEqual(media, [l.get('media', None) for l in links])
@override_settings(COMPRESS_PRECOMPILERS=(
- ('text/foobar', 'python %s {infile} {outfile}' % os.path.join(test_dir, 'precompiler.py')),
+ ('text/foobar', '%s %s {infile} {outfile}' % (sys.executable, os.path.join(test_dir, 'precompiler.py'))),
), COMPRESS_ENABLED=False)
def test_passthough_when_compress_disabled(self):
css = """\