mirror of
https://github.com/nicolargo/glances.git
synced 2024-09-20 09:08:37 +03:00
unittest: start server in a modified environment.
This changes allows the user to run the unittests properly in a virtualenv setup. Once the venv activated, /usr/bin/env will point the python executable within the venv instead of the system one. Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>
This commit is contained in:
parent
49c3c6c6be
commit
485f2203e0
@ -79,7 +79,7 @@ class TestGlances(unittest.TestCase):
|
||||
|
||||
global pid
|
||||
|
||||
cmdline = "/usr/bin/python -m glances -w -p %s" % SERVER_PORT
|
||||
cmdline = "/usr/bin/env python -m glances -w -p %s" % SERVER_PORT
|
||||
print("Run the Glances Web Server on port %s" % SERVER_PORT)
|
||||
args = shlex.split(cmdline)
|
||||
pid = subprocess.Popen(args)
|
||||
|
@ -86,7 +86,7 @@ class TestGlances(unittest.TestCase):
|
||||
|
||||
global pid
|
||||
|
||||
cmdline = "/usr/bin/python -m glances -s -p %s" % SERVER_PORT
|
||||
cmdline = "/usr/bin/env python -m glances -s -p %s" % SERVER_PORT
|
||||
print("Run the Glances Server on port %s" % SERVER_PORT)
|
||||
args = shlex.split(cmdline)
|
||||
pid = subprocess.Popen(args)
|
||||
|
Loading…
Reference in New Issue
Block a user