From db79ed5c4da4ffe9c554e9a241363be61f8435ab Mon Sep 17 00:00:00 2001 From: Oliver Bestwalter Date: Wed, 22 Jun 2016 10:19:43 +0200 Subject: [PATCH] Add tests to make sure expected entry points exist (#1629) --- testing/test_entry_points.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 testing/test_entry_points.py diff --git a/testing/test_entry_points.py b/testing/test_entry_points.py new file mode 100644 index 000000000..370b93129 --- /dev/null +++ b/testing/test_entry_points.py @@ -0,0 +1,13 @@ +import pkg_resources + +import pytest + + +@pytest.mark.parametrize("entrypoint", ['py.test', 'pytest']) +def test_entry_point_exist(entrypoint): + assert entrypoint in pkg_resources.get_entry_map('pytest')['console_scripts'] + + +def test_pytest_entry_points_are_identical(): + entryMap = pkg_resources.get_entry_map('pytest')['console_scripts'] + assert entryMap['pytest'].module_name == entryMap['py.test'].module_name