-
-
Notifications
You must be signed in to change notification settings - Fork 741
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
""" | ||
virtualenv config test module | ||
""" | ||
|
||
from tests.base import RemoteGefUnitTestGeneric | ||
from os import system | ||
from tempfile import mktemp | ||
|
||
|
||
class VirtualenvConfig(RemoteGefUnitTestGeneric): | ||
"""virtualenv config test module""" | ||
|
||
def setUp(self) -> None: | ||
venv_path = mktemp() | ||
system(f"virtualenv {venv_path}") | ||
system(f"{venv_path}/bin/pip install numpy") | ||
|
||
self.venv_path = venv_path | ||
|
||
return super().setUp() | ||
|
||
def test_conf_venv(self): | ||
gdb = self._gdb | ||
gdb.execute(f"gef config gef.virtualenv_path {self.venv_path}") | ||
|
||
res = gdb.execute("pi __import__('numpy').test()", to_string=True) | ||
assert 'NumPy version' in res |