Commit 68c03bee authored by idle sign's avatar idle sign

Section names now dot-separated to mimic .toml table names.

parent 566e9aee
...@@ -32,7 +32,7 @@ class ConfigHandler(object): ...@@ -32,7 +32,7 @@ class ConfigHandler(object):
if not section_name.startswith(section_prefix): if not section_name.startswith(section_prefix):
continue continue
section_name = section_name.replace(section_prefix, '').strip(':') section_name = section_name.replace(section_prefix, '').strip('.')
sections[section_name] = section_options sections[section_name] = section_options
self.target_obj = target_obj self.target_obj = target_obj
......
...@@ -157,7 +157,7 @@ class TestMetadata: ...@@ -157,7 +157,7 @@ class TestMetadata:
fake_env( fake_env(
tmpdir, tmpdir,
'[metadata:some]\n' '[metadata.some]\n'
'key = val\n' 'key = val\n'
) )
with get_dist(tmpdir, parse=False) as dist: with get_dist(tmpdir, parse=False) as dist:
...@@ -187,7 +187,7 @@ class TestMetadata: ...@@ -187,7 +187,7 @@ class TestMetadata:
# From section. # From section.
tmpdir.join('setup.cfg').write( tmpdir.join('setup.cfg').write(
'[metadata:classifiers]\n' '[metadata.classifiers]\n'
'Framework :: Django\n' 'Framework :: Django\n'
'Programming Language :: Python :: 3.5\n' 'Programming Language :: Python :: 3.5\n'
) )
...@@ -329,11 +329,11 @@ class TestOptions: ...@@ -329,11 +329,11 @@ class TestOptions:
def test_package_data(self, tmpdir): def test_package_data(self, tmpdir):
fake_env( fake_env(
tmpdir, tmpdir,
'[options:package_data]\n' '[options.package_data]\n'
'* = *.txt, *.rst\n' '* = *.txt, *.rst\n'
'hello = *.msg\n' 'hello = *.msg\n'
'\n' '\n'
'[options:exclude_package_data]\n' '[options.exclude_package_data]\n'
'* = fake1.txt, fake2.txt\n' '* = fake1.txt, fake2.txt\n'
'hello = *.dat\n' 'hello = *.dat\n'
) )
...@@ -373,9 +373,11 @@ class TestOptions: ...@@ -373,9 +373,11 @@ class TestOptions:
def test_extras_require(self, tmpdir): def test_extras_require(self, tmpdir):
fake_env( fake_env(
tmpdir, tmpdir,
'[options:extras_require]\n' '[options.extras_require]\n'
'pdf = ReportLab>=1.2; RXP\n' 'pdf = ReportLab>=1.2; RXP\n'
'rest = docutils>=0.3; pack ==1.1, ==1.3\n' 'rest = \n'
' docutils>=0.3\n'
' pack ==1.1, ==1.3\n'
) )
with get_dist(tmpdir) as dist: with get_dist(tmpdir) as dist:
...@@ -387,7 +389,7 @@ class TestOptions: ...@@ -387,7 +389,7 @@ class TestOptions:
def test_entry_points(self, tmpdir): def test_entry_points(self, tmpdir):
fake_env( fake_env(
tmpdir, tmpdir,
'[options:entry_points]\n' '[options.entry_points]\n'
'group1 = point1 = pack.module:func, ' 'group1 = point1 = pack.module:func, '
'.point2 = pack.module2:func_rest [rest]\n' '.point2 = pack.module2:func_rest [rest]\n'
'group2 = point3 = pack.module:func2\n' 'group2 = point3 = pack.module:func2\n'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment