Пример #1
0
def cache_file_path():
    return os.path.join(hypothesis_home_dir(),
                        os.path.basename(__file__) + '.cache')
Пример #2
0
def test_will_pick_up_location_from_env(tmpdir):
    os.environ['HYPOTHESIS_STORAGE_DIRECTORY'] = str(tmpdir)
    assert fs.hypothesis_home_dir() == str(tmpdir)
Пример #3
0
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)
Пример #4
0
def test_homedir_exists_automatically():
    assert os.path.exists(fs.hypothesis_home_dir())
Пример #5
0
def setup_function(function):
    global previous_home_dir
    previous_home_dir = fs.hypothesis_home_dir()
    fs.set_hypothesis_home_dir(None)
Пример #6
0
def cache_file_path():
    return os.path.join(hypothesis_home_dir(),
                        os.path.basename(__file__) + '.cache')