Added pybrew to bashrc and Help command by default

This commit is contained in:
Yuta
2011-03-19 02:26:44 +09:00
parent 7e494c1c7e
commit 459fdae35f
16 changed files with 111 additions and 62 deletions
+1 -4
View File
@@ -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 -1
View File
@@ -1,3 +1,3 @@
def test_install_pythonbrew():
from pythonbrew.installer import install_pythonbrew
install_pythonbrew()
install_pythonbrew()
+3 -2
View File
@@ -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])
+3 -2
View File
@@ -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])
+3 -2
View File
@@ -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])
+7
View File
@@ -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])
+3 -2
View 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])