mirror of
https://github.com/kennethreitz-archive/python-build.git
synced 2026-06-05 15:20:16 +00:00
22 lines
485 B
Python
22 lines
485 B
Python
import os
|
|
import shutil
|
|
|
|
PYTHONBREW_ROOT = '/tmp/pythonbrew.test'
|
|
TESTPY_FILE = '/tmp/pythonbrew_test.py'
|
|
TESTPY_VERSION = '2.6.6'
|
|
def cleanall():
|
|
if os.path.isdir(PYTHONBREW_ROOT):
|
|
shutil.rmtree(PYTHONBREW_ROOT)
|
|
if os.path.isfile(TESTPY_FILE):
|
|
os.remove(TESTPY_FILE)
|
|
|
|
def setup():
|
|
os.environ['PYTHONBREW_ROOT'] = PYTHONBREW_ROOT
|
|
cleanall()
|
|
fp = open(TESTPY_FILE, 'w')
|
|
fp.write("print 'test'")
|
|
fp.close()
|
|
|
|
def teardown():
|
|
cleanall()
|