You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
716 B
26 lines
716 B
2 years ago
|
import pytest
|
||
|
from scripttease.lib.commands.python import *
|
||
|
|
||
|
|
||
|
def test_python_pip():
|
||
|
c = python_pip("Pillow")
|
||
|
assert "pip3 install Pillow" in c.get_statement()
|
||
|
|
||
|
c = python_pip("Pillow", upgrade=True)
|
||
|
assert "--upgrade" in c.get_statement()
|
||
|
|
||
|
c = python_pip("Pillow", venv="python")
|
||
|
assert "source python/bin/activate" in c.get_statement()
|
||
|
|
||
|
|
||
|
def test_python_pip_file():
|
||
|
c = python_pip_file("deploy/packages/testing.pip", venv="python")
|
||
|
s = c.get_statement()
|
||
|
assert "pip3 install -r deploy/packages/testing.pip" in s
|
||
|
assert "source python/bin/activate" in s
|
||
|
|
||
|
|
||
|
def test_python_virtual_env():
|
||
|
c = python_virtualenv("python")
|
||
|
assert "virtualenv python" in c.get_statement()
|