mirror of
https://github.com/kennethreitz-archive/python-build.git
synced 2026-06-05 15:20:16 +00:00
Added pybrew to bashrc and Help command by default
This commit is contained in:
+1
-4
@@ -3,7 +3,7 @@ import shutil
|
||||
|
||||
PYTHONBREW_ROOT = '/tmp/pythonbrew.test'
|
||||
TESTPY_FILE = '/tmp/pythonbrew_test.py'
|
||||
TESTPY_VERSION = '2.6.6'
|
||||
TESTPY_VERSION = ['2.4.6', '2.5.5', '2.6.6']
|
||||
def cleanall():
|
||||
if os.path.isdir(PYTHONBREW_ROOT):
|
||||
shutil.rmtree(PYTHONBREW_ROOT)
|
||||
@@ -13,9 +13,6 @@ def cleanall():
|
||||
def setup():
|
||||
os.environ['PYTHONBREW_ROOT'] = PYTHONBREW_ROOT
|
||||
cleanall()
|
||||
fp = open(TESTPY_FILE, 'w')
|
||||
fp.write("print 'test'")
|
||||
fp.close()
|
||||
|
||||
def teardown():
|
||||
cleanall()
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
def test_install_pythonbrew():
|
||||
from pythonbrew.installer import install_pythonbrew
|
||||
install_pythonbrew()
|
||||
install_pythonbrew()
|
||||
@@ -7,5 +7,6 @@ class InstallOptions(object):
|
||||
|
||||
def test_install():
|
||||
from pythonbrew.commands.install import InstallCommand
|
||||
c = InstallCommand()
|
||||
c.run_command(InstallOptions(), [TESTPY_VERSION])
|
||||
for py_version in TESTPY_VERSION:
|
||||
c = InstallCommand()
|
||||
c.run_command(InstallOptions(), [py_version])
|
||||
|
||||
@@ -2,5 +2,6 @@ from tests import TESTPY_VERSION
|
||||
|
||||
def test_switch():
|
||||
from pythonbrew.commands.switch import SwitchCommand
|
||||
c = SwitchCommand()
|
||||
c.run_command(None, [TESTPY_VERSION])
|
||||
for py_version in TESTPY_VERSION:
|
||||
c = SwitchCommand()
|
||||
c.run_command(None, [py_version])
|
||||
|
||||
@@ -2,5 +2,6 @@ from tests import TESTPY_VERSION
|
||||
|
||||
def test_use():
|
||||
from pythonbrew.commands.use import UseCommand
|
||||
c = UseCommand()
|
||||
c.run_command(None, [TESTPY_VERSION])
|
||||
for py_version in TESTPY_VERSION:
|
||||
c = UseCommand()
|
||||
c.run_command(None, [py_version])
|
||||
|
||||
@@ -4,7 +4,14 @@ class PyOptions(object):
|
||||
pythons = []
|
||||
verbose = False
|
||||
|
||||
def _create_pyfile():
|
||||
fp = open(TESTPY_FILE, 'w')
|
||||
fp.write("print 'test'")
|
||||
fp.close()
|
||||
|
||||
def test_py():
|
||||
from pythonbrew.commands.py import PyCommand
|
||||
_create_pyfile()
|
||||
|
||||
c = PyCommand()
|
||||
c.run_command(PyOptions(), [TESTPY_FILE])
|
||||
|
||||
@@ -2,5 +2,6 @@ from tests import TESTPY_VERSION
|
||||
|
||||
def test_uninstall():
|
||||
from pythonbrew.commands.uninstall import UninstallCommand
|
||||
c = UninstallCommand()
|
||||
c.run_command(None, [TESTPY_VERSION])
|
||||
for py_version in TESTPY_VERSION:
|
||||
c = UninstallCommand()
|
||||
c.run_command(None, [py_version])
|
||||
|
||||
Reference in New Issue
Block a user