File: 0002-Use-sys.executable-to-run-crontest.patch

package info (click to toggle)
python-crontab 3.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 536 kB
  • sloc: python: 2,935; sh: 6; makefile: 3
file content (32 lines) | stat: -rw-r--r-- 961 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From: Michael Fladischer <FladischerMichael@fladi.at>
Date: Wed, 25 Nov 2020 20:01:03 +0100
Subject: Use sys.executable to run crontest.

---
 tests/data/crontest     | 2 --
 tests/test_scheduler.py | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/tests/data/crontest b/tests/data/crontest
index 6142caf..cd9a7aa 100755
--- a/tests/data/crontest
+++ b/tests/data/crontest
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-
 import os
 import sys
 
diff --git a/tests/test_scheduler.py b/tests/test_scheduler.py
index bbce608..e5d7596 100644
--- a/tests/test_scheduler.py
+++ b/tests/test_scheduler.py
@@ -38,7 +38,7 @@ logger = logging.getLogger()
 logger.level = logging.WARNING
 
 TEST_DIR = os.path.dirname(__file__)
-COMMAND = os.path.join(TEST_DIR, 'data', 'crontest ')
+COMMAND = sys.executable + ' ' + os.path.join(TEST_DIR, 'data', 'crontest ')
 
 class SchedulerTestCase(unittest.TestCase):
     """Test scheduling functions of CronTab."""