Пример #1
0
def setup():
    global tmp_dir

    try:
        tmp_dir = os.path.join(os.path.dirname(__file__), 'tmp')
        os.mkdir(tmp_dir)
    except:
        pass

    tmp_dir = build_tools.configure_temp_dir(tmp_dir)
Пример #2
0
def setup():
    global tmp_dir

    tmp_dir = os.path.join(os.path.dirname(__file__), 'tmp')

    try:
        os.mkdir(tmp_dir)
    except:
        pass

    tmp_dir = build_tools.configure_temp_dir(tmp_dir)
Пример #3
0
def setup():
    # setup is run prior to executing any of the included tests

    # setup ensures that a temporary directory is established either locally
    # or in the most secure location possible.

    global tmp_dir
    tmp_dir = os.path.join(os.path.dirname(__file__), 'tmp')

    try:
        os.mkdir(tmp_dir)
    except:
        pass

    tmp_dir = build_tools.configure_temp_dir(tmp_dir)
Пример #4
0
def setup():
    # setup is run prior to executing any of the included tests

    # setup ensures that a temporary directory is established either locally
    # or in the most secure location possible.

    global tmp_dir
    tmp_dir = os.path.join(os.path.dirname(__file__), 'tmp')

    try:
        os.mkdir(tmp_dir)
    except:
        pass

    tmp_dir = build_tools.configure_temp_dir(tmp_dir)
Пример #5
0
 def test_default(self):
     " default behavior returns tempdir"
     # this'll fail if the temp directory isn't writable.
     d = build_tools.configure_temp_dir()
     assert_(d == tempfile.gettempdir())
     assert_(is_writable(d))
Пример #6
0
 def test_default(self):
     " default behavior returns tempdir"
     # this'll fail if the temp directory isn't writable.
     d = build_tools.configure_temp_dir()
     assert_(d == tempfile.gettempdir())
     assert_(is_writable(d))