Beispiel #1
0
def cache_file_path():
    return os.path.join(hypothesis_home_dir(),
                        os.path.basename(__file__) + '.cache')
def test_will_pick_up_location_from_env(tmpdir):
    os.environ['HYPOTHESIS_STORAGE_DIRECTORY'] = str(tmpdir)
    assert fs.hypothesis_home_dir() == str(tmpdir)
def test_can_set_homedir_and_it_will_exist(tmpdir):
    fs.set_hypothesis_home_dir(str(tmpdir.mkdir('kittens')))
    d = fs.hypothesis_home_dir()
    assert 'kittens' in d
    assert os.path.exists(d)
def test_homedir_exists_automatically():
    assert os.path.exists(fs.hypothesis_home_dir())
def setup_function(function):
    global previous_home_dir
    previous_home_dir = fs.hypothesis_home_dir()
    fs.set_hypothesis_home_dir(None)
Beispiel #6
0
def cache_file_path():
    return os.path.join(hypothesis_home_dir(),
                        os.path.basename(__file__) + '.cache')