Skip to content

Commit

Permalink
Ignore local config while running CLI tests. #355
Browse files Browse the repository at this point in the history
  • Loading branch information
lemon24 committed Oct 10, 2024
1 parent 12d02a2 commit bdf9c18
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,20 @@ def reset_logging(pytestconfig):
pytestconfig.pluginmanager.register(logging_plugin, "logging-plugin")


@pytest.fixture(autouse=True)
def patch_app_dir(monkeypatch, tmp_path):
"""Ignore local config while running tests.
https://github.com/lemon24/reader/issues/355
"""

def get_app_dir(app_name):
return str(tmp_path.joinpath('app_dir', app_name))

monkeypatch.setattr('click.get_app_dir', get_app_dir)


@pytest.mark.slow
def test_cli(db_path, data_dir, monkeypatch):
feed_filename = 'full.atom'
Expand Down

0 comments on commit bdf9c18

Please sign in to comment.