Skip to content

Commit b906688

Browse files
timfelansalond
authored andcommitted
add test with pip
(cherry picked from commit b7dbff0)
1 parent fab16ee commit b906688

File tree

1 file changed

+12
-3
lines changed
  • graalpython/com.oracle.graal.python.test/src/tests

1 file changed

+12
-3
lines changed

graalpython/com.oracle.graal.python.test/src/tests/test_venv.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,31 @@
3737
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
3838
# SOFTWARE.
3939

40-
import tempfile
41-
import sys
42-
import shutil
4340
import os
41+
import re
42+
import shutil
4443
import subprocess
44+
import sys
45+
import tempfile
4546

4647

4748
class VenvTest():
4849
def setUp(self):
4950
self.env_dir = os.path.realpath(tempfile.mkdtemp())
51+
self.env_dir2 = os.path.realpath(tempfile.mkdtemp())
5052

5153
def tearDown(self):
5254
shutil.rmtree(self.env_dir)
55+
shutil.rmtree(self.env_dir2)
5356

5457
def test_create_and_use_basic_venv(self):
5558
subprocess.check_output([sys.executable, "-m", "venv", self.env_dir, "--without-pip"])
5659
run = subprocess.getoutput(". %s/bin/activate; python -m site" % self.env_dir)
5760
assert "ENABLE_USER_SITE: False" in run, run
5861
assert self.env_dir in run, run
62+
63+
def test_create_and_use_venv_with_pip(self):
64+
subprocess.check_output([sys.executable, "-m", "venv", self.env_dir2])
65+
run = subprocess.getoutput("%s/bin/python -m pip list" % self.env_dir2)
66+
assert "\npip" in run, run
67+
assert "\nsetuptools" in run, run

0 commit comments

Comments
 (0)