3
3
# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt
4
4
5
5
"""Test the config file handling for coverage.py"""
6
+
6
7
from collections import OrderedDict
7
8
8
9
import mock
@@ -62,6 +63,8 @@ def test_toml_config_file(self):
62
63
# A .coveragerc file will be read into the configuration.
63
64
self .make_file ("pyproject.toml" , """\
64
65
# This is just a bogus toml file for testing.
66
+ [tool.somethingelse]
67
+ authors = ["Joe D'Ávila <[email protected] >"]
65
68
[tool.coverage.run]
66
69
concurrency = ["a", "b"]
67
70
timid = true
@@ -70,20 +73,23 @@ def test_toml_config_file(self):
70
73
[tool.coverage.report]
71
74
precision = 3
72
75
fail_under = 90.5
76
+ [tool.coverage.html]
77
+ title = "tabblo & «ταБЬℓσ»"
73
78
[tool.coverage.plugins.a_plugin]
74
79
hello = "world"
75
80
""" )
76
81
cov = coverage .Coverage (config_file = "pyproject.toml" )
77
82
self .assertTrue (cov .config .timid )
78
83
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" ])
82
87
self .assertEqual (cov .config .precision , 3 )
88
+ self .assertEqual (cov .config .html_title , u"tabblo & «ταБЬℓσ»" )
83
89
self .assertAlmostEqual (cov .config .fail_under , 90.5 )
84
90
self .assertEqual (
85
91
cov .config .get_plugin_options ("plugins.a_plugin" ),
86
- {' hello' : ' world' }
92
+ {u" hello" : u" world" }
87
93
)
88
94
89
95
# Test that our class doesn't reject integers when loading floats
0 commit comments