@pytest.fixture()
def pg_xlog(tmpdir, monkeypatch):
 monkeypatch.chdir(tmpdir)
 return PgXlog(tmpdir)

@ pytest . fixture ( ) def pg_xlog ( tmpdir , monkeypatch ) : monkeypatch . chdir ( tmpdir ) return PgXlog ( tmpdir )
set up xlog utility functions and change directories .