コード例 #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))
    )
コード例 #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)))
コード例 #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)
コード例 #4
0
def test_normalize():
    eq_(utils.normalize('..', 'tests', ), os.path.dirname(__file__))
コード例 #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)
コード例 #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)