Skip to content

Commit f0d3921

Browse files
committed
A test for bug 990
1 parent a462ab4 commit f0d3921

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

tests/test_config.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt
44

55
"""Test the config file handling for coverage.py"""
6+
67
from collections import OrderedDict
78

89
import mock
@@ -62,6 +63,8 @@ def test_toml_config_file(self):
6263
# A .coveragerc file will be read into the configuration.
6364
self.make_file("pyproject.toml", """\
6465
# This is just a bogus toml file for testing.
66+
[tool.somethingelse]
67+
authors = ["Joe D'Ávila <[email protected]>"]
6568
[tool.coverage.run]
6669
concurrency = ["a", "b"]
6770
timid = true
@@ -70,20 +73,23 @@ def test_toml_config_file(self):
7073
[tool.coverage.report]
7174
precision = 3
7275
fail_under = 90.5
76+
[tool.coverage.html]
77+
title = "tabblo & «ταБЬℓσ»"
7378
[tool.coverage.plugins.a_plugin]
7479
hello = "world"
7580
""")
7681
cov = coverage.Coverage(config_file="pyproject.toml")
7782
self.assertTrue(cov.config.timid)
7883
self.assertFalse(cov.config.branch)
79-
self.assertEqual(cov.config.concurrency, ["a", "b"])
80-
self.assertEqual(cov.config.data_file, ".hello_kitty.data")
81-
self.assertEqual(cov.config.plugins, ["plugins.a_plugin"])
84+
self.assertEqual(cov.config.concurrency, [u"a", u"b"])
85+
self.assertEqual(cov.config.data_file, u".hello_kitty.data")
86+
self.assertEqual(cov.config.plugins, [u"plugins.a_plugin"])
8287
self.assertEqual(cov.config.precision, 3)
88+
self.assertEqual(cov.config.html_title, u"tabblo & «ταБЬℓσ»")
8389
self.assertAlmostEqual(cov.config.fail_under, 90.5)
8490
self.assertEqual(
8591
cov.config.get_plugin_options("plugins.a_plugin"),
86-
{'hello': 'world'}
92+
{u"hello": u"world"}
8793
)
8894

8995
# Test that our class doesn't reject integers when loading floats

0 commit comments

Comments
 (0)