python-Glances/fix-tests.patch
Dirk Mueller ea25880052 Accepting request 1082797 from home:amanzini:branches:devel:languages:python
- Update to 3.3.1
  * Minor change on the help screen
  * Refactor some loop in the processes function
  * Replace json by ujson #2201
  * Improvements on documentation, unit test and CI
  * bump dependencies and web lib to address security

OBS-URL: https://build.opensuse.org/request/show/1082797
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Glances?expand=0&rev=48
2023-04-27 21:55:04 +00:00

43 lines
1.4 KiB
Diff

Index: glances-3.3.1/unitest-restful.py
===================================================================
--- glances-3.3.1.orig/unitest-restful.py
+++ glances-3.3.1/unitest-restful.py
@@ -12,6 +12,7 @@
import shlex
import subprocess
+import sys
import time
import numbers
import unittest
@@ -58,7 +59,7 @@ class TestGlances(unittest.TestCase):
if os.path.isfile("./venv/bin/python"):
cmdline = "./venv/bin/python"
else:
- cmdline = "python"
+ cmdline = sys.executable
cmdline += " -m glances -B localhost -w -p %s" % SERVER_PORT
print("Run the Glances Web Server on port %s" % SERVER_PORT)
args = shlex.split(cmdline)
Index: glances-3.3.1/unitest-xmlrpc.py
===================================================================
--- glances-3.3.1.orig/unitest-xmlrpc.py
+++ glances-3.3.1/unitest-xmlrpc.py
@@ -13,6 +13,7 @@
import json
import shlex
import subprocess
+import sys
import time
import unittest
import os
@@ -47,7 +48,7 @@ class TestGlances(unittest.TestCase):
if os.path.isfile("./venv/bin/python"):
cmdline = "./venv/bin/python"
else:
- cmdline = "python"
+ cmdline = sys.executable
cmdline += " -m glances -B localhost -s -p %s" % SERVER_PORT
print("Run the Glances Server on port %s" % SERVER_PORT)
args = shlex.split(cmdline)