Skip to content

Commit

Permalink
Add case-sensitive entry point name test
Browse files Browse the repository at this point in the history
  • Loading branch information
melissa-kun-li committed Feb 24, 2021
1 parent 21b122e commit 90d8740
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions setuptools/tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,40 @@ def test_entry_points(self, tmpdir):
with get_dist(tmpdir) as dist:
assert dist.entry_points == expected

def test_case_sensitive_entry_points(self, tmpdir):
_, config = fake_env(
tmpdir,
'[options.entry_points]\n'
'GROUP1 = point1 = pack.module:func, '
'.point2 = pack.module2:func_rest [rest]\n'
'group2 = point3 = pack.module:func2\n'
)

with get_dist(tmpdir) as dist:
assert dist.entry_points == {
'GROUP1': [
'point1 = pack.module:func',
'.point2 = pack.module2:func_rest [rest]',
],
'group2': ['point3 = pack.module:func2']
}

expected = (
'[blogtool.parsers]\n'
'.rst = some.nested.module:SomeClass.some_classmethod[reST]\n'
)

tmpdir.join('entry_points').write(expected)

# From file.
config.write(
'[options]\n'
'entry_points = file: entry_points\n'
)

with get_dist(tmpdir) as dist:
assert dist.entry_points == expected

def test_data_files(self, tmpdir):
fake_env(
tmpdir,
Expand Down

0 comments on commit 90d8740

Please sign in to comment.