summaryrefslogtreecommitdiff
path: root/tests/test_config.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-01-31 09:12:43 -0500
committerNed Batchelder <ned@nedbatchelder.com>2021-01-31 09:20:49 -0500
commit65b5830a4d13d65c3bb314dd4894d565a16ceb9b (patch)
tree12b5c6bdf4bb68145c75d3c2d802adc050c7febb /tests/test_config.py
parent4bad09744d80c6123e77252d5db09a31db25297b (diff)
downloadpython-coveragepy-git-65b5830a4d13d65c3bb314dd4894d565a16ceb9b.tar.gz
style: singleton comparisons should use is
I guess the original line was wrong, but it would have been nice for unittest2pytest to fix it for me: https://github.com/pytest-dev/unittest2pytest/issues/52
Diffstat (limited to 'tests/test_config.py')
-rw-r--r--tests/test_config.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/test_config.py b/tests/test_config.py
index 0a742f3d..f1df4d72 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -232,7 +232,7 @@ class ConfigTest(CoverageTest):
self.set_environ("OKAY", "yes")
cov = coverage.Coverage()
assert cov.config.data_file == "hello-world.fooey"
- assert cov.config.branch == True
+ assert cov.config.branch is True
assert cov.config.exclude_list == \
["the_$one", "anotherZZZ", "xZZZy", "xy", "huh${X}what"]
@@ -256,7 +256,7 @@ class ConfigTest(CoverageTest):
self.set_environ("THING", "ZZZ")
cov = coverage.Coverage()
assert cov.config.data_file == "hello-world.fooey"
- assert cov.config.branch == True
+ assert cov.config.branch is True
assert cov.config.exclude_list == \
["the_$one", "anotherZZZ", "xZZZy", "xy", "huh${X}what"]
@@ -582,8 +582,8 @@ class ConfigFileTest(UsingModulesMixin, CoverageTest):
'names': 'Jane/John/Jenny',
}
assert cov.config.get_plugin_options("plugins.another") == {}
- assert cov.config.json_show_contexts == True
- assert cov.config.json_pretty_print == True
+ assert cov.config.json_show_contexts is True
+ assert cov.config.json_pretty_print is True
def test_config_file_settings(self):
self.make_file(".coveragerc", self.LOTSA_SETTINGS.format(section=""))
@@ -629,8 +629,8 @@ class ConfigFileTest(UsingModulesMixin, CoverageTest):
""")
cov = coverage.Coverage()
assert cov.config.run_include == ["foo"]
- assert cov.config.run_omit == None
- assert cov.config.branch == False
+ assert cov.config.run_omit is None
+ assert cov.config.branch is False
def test_setupcfg_only_if_not_coveragerc(self):
self.check_other_not_read_if_coveragerc("setup.cfg")
@@ -646,8 +646,8 @@ class ConfigFileTest(UsingModulesMixin, CoverageTest):
branch = true
""")
cov = coverage.Coverage()
- assert cov.config.run_omit == None
- assert cov.config.branch == False
+ assert cov.config.run_omit is None
+ assert cov.config.branch is False
def test_setupcfg_only_if_prefixed(self):
self.check_other_config_need_prefixes("setup.cfg")