Esempio n. 1
0
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))
    )
Esempio n. 2
0
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)))
Esempio n. 3
0
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)
Esempio n. 4
0
def test_normalize():
    eq_(utils.normalize('..', 'tests', ), os.path.dirname(__file__))
Esempio n. 5
0
def test_chdir():
    current = os.getcwd()
    outer = os.path.abspath(utils.normalize(current, '..'))
    with utils.chdir('..'):
        eq_(os.getcwd(), outer)
    eq_(os.getcwd(), current)
Esempio n. 6
0
def test_chdir():
    current = os.getcwd()
    outer = os.path.abspath(utils.normalize(current, '..'))
    with utils.chdir('..'):
        eq_(os.getcwd(), outer)
    eq_(os.getcwd(), current)