summaryrefslogtreecommitdiff
path: root/functional_tests/test_entrypoints.py
blob: 5bc96465417f02398ad3a83b3d805deb36fe3235 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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)