Add test for proper dependencies

This commit is contained in:
Markus Unterwaditzer 2016-03-03 13:05:00 +01:00
parent c7e6ca20e4
commit cd07d7fc68

View file

@ -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]