awips2/pythonPackages/nose/functional_tests/test_entrypoints.py
mjames-upc e2adf2842d nose 1.3.7
Former-commit-id: 3a5dd251de
2016-03-18 19:50:07 -06:00

20 lines
524 B
Python

import os
import sys
from nose.exc import SkipTest
try:
from pkg_resources import EntryPoint
except ImportError:
raise SkipTest("No setuptools available; skipping")
here = os.path.dirname(__file__)
support = os.path.join(here, 'support')
ep = os.path.join(support, 'ep')
def test_plugin_entrypoint_is_loadable():
ep_path = os.path.join(ep, 'Some_plugin.egg-info', 'entry_points.txt')
ep_file = open(ep_path, 'r')
lines = ep_file.readlines()
ep_file.close()
assert EntryPoint.parse_map(lines)