summaryrefslogtreecommitdiff
path: root/setuptools
diff options
context:
space:
mode:
authorMelissa Li <li.melissa.kun@gmail.com>2021-02-23 21:06:55 -0500
committerMelissa Li <li.melissa.kun@gmail.com>2021-02-23 22:41:18 -0500
commit90d8740c353ddf20c1c76d8c06cd923c19b8cc84 (patch)
tree8098fcea4d132f6fe1621f9382b204eeec201d3a /setuptools
parent21b122e06969a9d85c65ce8276519d34da7dc747 (diff)
downloadpython-setuptools-git-90d8740c353ddf20c1c76d8c06cd923c19b8cc84.tar.gz
Add case-sensitive entry point name test
Diffstat (limited to 'setuptools')
-rw-r--r--setuptools/tests/test_config.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py
index 1dee1271..6cc1d0a4 100644
--- a/setuptools/tests/test_config.py
+++ b/setuptools/tests/test_config.py
@@ -802,6 +802,40 @@ class TestOptions:
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,