Mercurial > hatta-flask
changeset 2381:6bdd6a721a1f
Fix #91: Convert the unit tests to a recent version of py.test
| author | Radomir Dopieralski <sheep-devel@sheep.art.pl> |
|---|---|
| date | Sat, 11 May 2013 19:51:32 +0200 |
| parents | d93525563756 |
| children | 823a6789db17 |
| files | tests/test_hatta.py tests/test_repo.py |
| diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test_hatta.py Sat May 11 19:21:33 2013 +0200 +++ b/tests/test_hatta.py Sat May 11 19:51:32 2013 +0200 @@ -20,7 +20,7 @@ pass def pytest_funcarg__wiki(request): - basedir = str(request.config.ensuretemp('repo')) + basedir = str(py.test.ensuretemp('repo')) config = hatta.WikiConfig( pages_path=os.path.join(basedir, 'pages'), cache_path=os.path.join(basedir, 'cache'), @@ -183,7 +183,7 @@ def pytest_funcarg__req(request): - basedir = str(request.config.ensuretemp('repo')) + basedir = str(py.test.ensuretemp('repo')) request.addfinalizer(lambda: clear_directory(basedir)) config = hatta.WikiConfig( pages_path=os.path.join(basedir, 'pages'),
--- a/tests/test_repo.py Sat May 11 19:21:33 2013 +0200 +++ b/tests/test_repo.py Sat May 11 19:51:32 2013 +0200 @@ -44,7 +44,7 @@ temporary directory. """ - repo_path = str(request.config.ensuretemp('repo')) + repo_path = str(py.test.ensuretemp('repo')) request.addfinalizer(lambda: clear_directory(repo_path)) return hatta.storage.WikiStorage(repo_path) @@ -55,7 +55,7 @@ temporary directory. """ - repo_path = str(request.config.ensuretemp('repo')) + repo_path = str(py.test.ensuretemp('repo')) request.addfinalizer(lambda: clear_directory(repo_path)) return hatta.storage.WikiSubdirectoryStorage(repo_path)
