diff --git a/debian/patches/0001-Update-tests-to-use-python3-instead-of-python.patch b/debian/patches/0001-Update-tests-to-use-python3-instead-of-python.patch new file mode 100644 index 0000000..dc89385 --- /dev/null +++ b/debian/patches/0001-Update-tests-to-use-python3-instead-of-python.patch @@ -0,0 +1,58 @@ +From: Nicolas Dandrimont +Date: Wed, 23 Oct 2019 15:20:06 +0200 +Subject: Update tests to use python3 instead of python + +--- + tests/executors/test_executor.py | 16 ++++++++-------- + tests/executors/test_executor_kill.py | 4 ++-- + 2 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/tests/executors/test_executor.py b/tests/executors/test_executor.py +index 8500e4b..4081a22 100644 +--- a/tests/executors/test_executor.py ++++ b/tests/executors/test_executor.py +@@ -229,14 +229,14 @@ def test_executor_methods_returning_self(): + def test_mirakuru_cleanup(): + """Test if cleanup_subprocesses is fired correctly on python exit.""" + cmd = f''' +- python -c 'from mirakuru import SimpleExecutor; +- from time import sleep; +- import gc; +- gc.disable(); +- ex = SimpleExecutor( +- ("python", "{SAMPLE_DAEMON_PATH}")).start(); +- sleep(1); +- ' ++ python3 -c 'from mirakuru import SimpleExecutor; ++ from time import sleep; ++ import gc; ++ gc.disable(); ++ ex = SimpleExecutor( ++ ("python3", "{SAMPLE_DAEMON_PATH}")).start(); ++ sleep(1); ++ ' + ''' + check_output(shlex.split(cmd.replace('\n', ''))) + assert SAMPLE_DAEMON_PATH not in ps_aux() +diff --git a/tests/executors/test_executor_kill.py b/tests/executors/test_executor_kill.py +index ce5f42e..3e9dc0f 100644 +--- a/tests/executors/test_executor_kill.py ++++ b/tests/executors/test_executor_kill.py +@@ -38,7 +38,7 @@ def test_kill_custom_signal_kill(): + + def test_already_closed(): + """Check that the executor cleans after itself after it exited earlier.""" +- with SimpleExecutor('python') as executor: ++ with SimpleExecutor('python3') as executor: + assert executor.running() + os.killpg(executor.process.pid, SIGKILL) + +@@ -63,7 +63,7 @@ def test_daemons_killing(): + change the process group ID. This test verifies that daemon process + is killed after executor's kill(). + """ +- executor = SimpleExecutor(('python', SAMPLE_DAEMON_PATH), shell=True) ++ executor = SimpleExecutor(('python3', SAMPLE_DAEMON_PATH), shell=True) + executor.start() + time.sleep(2) + assert executor.running() is not True, \ diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..9dfe109 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +0001-Update-tests-to-use-python3-instead-of-python.patch