From cd07d7fc686bb353ab0831c7dff8cfaa102aee48 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Thu, 3 Mar 2016 13:05:00 +0100 Subject: [PATCH] Add test for proper dependencies --- tests/cli/test_main.py | 10 ++++++++++ 1 file changed, 10 insertions(+) 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]