def test_make_virtualenv(): cl_args = MockedArguments(name=PROJECT_NAME) mksite.make_virtualenv(cl_args) virtualenv_path = utils.normalize(utils.env.virtualenv_root, PROJECT_NAME) ok_(os.path.exists(virtualenv_path)) ok_(os.path.exists( utils.normalize(virtualenv_path, utils.env.project_container_name)) )
def test_make_virtualenv(): cl_args = MockedArguments({'name': PROJECT_NAME}) mksite.make_virtualenv(cl_args) virtualenv_path = utils.normalize(utils.env.virtualenv_root, PROJECT_NAME) assert_true(os.path.exists(virtualenv_path)) assert_true( os.path.exists( utils.normalize(virtualenv_path, utils.env.project_container_name)))
def test_chdir(): current = os.getcwd() outer = os.path.abspath(utils.normalize(current, '..')) with utils.chdir('..'): eq_(os.getcwd(), outer) eq_(os.getcwd(), current) try: with(utils.chdir('you_shall_not_pass')): assert_true(False) # Shouldn't enter here except OSError: eq_(os.getcwd(), current)
def test_normalize(): eq_(utils.normalize('..', 'tests', ), os.path.dirname(__file__))
def test_chdir(): current = os.getcwd() outer = os.path.abspath(utils.normalize(current, '..')) with utils.chdir('..'): eq_(os.getcwd(), outer) eq_(os.getcwd(), current)