diff --git a/tests/cli/test_main.py b/tests/cli/test_main.py index bb89c76..1cd8e2b 100644 --- a/tests/cli/test_main.py +++ b/tests/cli/test_main.py @@ -8,12 +8,22 @@ from click.testing import CliRunner from hypothesis import example, given import hypothesis.strategies as st +from pkg_resources import load_entry_point + import pytest import vdirsyncer.cli as cli from vdirsyncer.utils.compat import PY2, to_native +def test_entry_points(monkeypatch, capsys): + monkeypatch.setattr('sys.argv', ['--help']) + with pytest.raises(SystemExit) as excinfo: + load_entry_point('vdirsyncer', 'console_scripts', 'vdirsyncer')() + + assert excinfo.value.code == 0 + + def test_simple_run(tmpdir, runner): runner.write_with_general(dedent(''' [pair my_pair]