2018-10-25 15:01:29 +08:00
|
|
|
from __future__ import absolute_import
|
|
|
|
from __future__ import division
|
|
|
|
from __future__ import print_function
|
|
|
|
|
2016-06-22 16:19:43 +08:00
|
|
|
import pkg_resources
|
|
|
|
|
|
|
|
import pytest
|
|
|
|
|
|
|
|
|
2018-05-23 22:48:46 +08:00
|
|
|
@pytest.mark.parametrize("entrypoint", ["py.test", "pytest"])
|
2016-06-22 16:19:43 +08:00
|
|
|
def test_entry_point_exist(entrypoint):
|
2018-05-23 22:48:46 +08:00
|
|
|
assert entrypoint in pkg_resources.get_entry_map("pytest")["console_scripts"]
|
2016-06-22 16:19:43 +08:00
|
|
|
|
|
|
|
|
|
|
|
def test_pytest_entry_points_are_identical():
|
2018-05-23 22:48:46 +08:00
|
|
|
entryMap = pkg_resources.get_entry_map("pytest")["console_scripts"]
|
|
|
|
assert entryMap["pytest"].module_name == entryMap["py.test"].module_name
|