diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2018-12-24 16:20:24 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2018-12-24 16:20:24 -0500 |
commit | 8672eee93fc8e4cf017a133607a371547b5e7812 (patch) | |
tree | 216c8982b66afd4bea500d6ca7ab56b8a208624c | |
parent | c4875b6ce2265e6797705508bae09a7a74a710e4 (diff) | |
download | python-coveragepy-git-8672eee93fc8e4cf017a133607a371547b5e7812.tar.gz |
Asserts should be expected,actual
-rw-r--r-- | tests/test_debug.py | 2 | ||||
-rw-r--r-- | tests/test_oddball.py | 2 | ||||
-rw-r--r-- | tests/test_parser.py | 6 | ||||
-rw-r--r-- | tests/test_plugins.py | 4 | ||||
-rw-r--r-- | tests/test_process.py | 4 | ||||
-rw-r--r-- | tests/test_summary.py | 4 |
6 files changed, 11 insertions, 11 deletions
diff --git a/tests/test_debug.py b/tests/test_debug.py index 284d9567..4eaba92e 100644 --- a/tests/test_debug.py +++ b/tests/test_debug.py @@ -188,7 +188,7 @@ class DebugTraceTest(CoverageTest): expected = "CTracer: available" else: expected = "CTracer: unavailable" - self.assertEqual(tracer_line, expected) + self.assertEqual(expected, tracer_line) def f_one(*args, **kwargs): diff --git a/tests/test_oddball.py b/tests/test_oddball.py index 5d615c35..1087ea57 100644 --- a/tests/test_oddball.py +++ b/tests/test_oddball.py @@ -125,7 +125,7 @@ class RecursionTest(CoverageTest): _, statements, missing, _ = cov.analysis("recur.py") self.assertEqual(statements, [1, 2, 3, 5, 7, 8, 9, 10, 11]) - self.assertEqual(missing, expected_missing) + self.assertEqual(expected_missing, missing) # Get a warning about the stackoverflow effect on the tracing function. if pytrace: # pragma: no metacov diff --git a/tests/test_parser.py b/tests/test_parser.py index e6768a22..6d86822f 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -213,9 +213,9 @@ class PythonParserTest(CoverageTest): expected_arcs.update(set(self.arcz_to_arcs("-46 6-4"))) expected_exits.update({6: 1}) - self.assertEqual(parser.statements, expected_statements) - self.assertEqual(parser.arcs(), expected_arcs) - self.assertEqual(parser.exit_counts(), expected_exits) + self.assertEqual(expected_statements, parser.statements) + self.assertEqual(expected_arcs, parser.arcs()) + self.assertEqual(expected_exits, parser.exit_counts()) class ParserMissingArcDescriptionTest(CoverageTest): diff --git a/tests/test_plugins.py b/tests/test_plugins.py index b1614832..d3365a6d 100644 --- a/tests/test_plugins.py +++ b/tests/test_plugins.py @@ -426,7 +426,7 @@ class GoodFileTracerTest(FileTracerTest): '--------------------------------------------------------', 'TOTAL 11 7 0 0 36%', ] - self.assertEqual(report, expected) + self.assertEqual(expected, report) self.assertAlmostEqual(total, 36.36, places=2) def test_plugin2_with_html_report(self): @@ -512,7 +512,7 @@ class GoodFileTracerTest(FileTracerTest): '-----------------------------------------------', 'unsuspecting.py 6 3 50% 2, 4, 6', ] - self.assertEqual(report, expected) + self.assertEqual(expected, report) self.assertEqual(total, 50) def test_find_unexecuted(self): diff --git a/tests/test_process.py b/tests/test_process.py index d4db11fe..a1e71f1c 100644 --- a/tests/test_process.py +++ b/tests/test_process.py @@ -398,7 +398,7 @@ class ProcessTest(CoverageTest): self.assertEqual(len(summary), 1) actual = os.path.normcase(os.path.abspath(list(summary.keys())[0])) expected = os.path.normcase(os.path.abspath('src/x.py')) - self.assertEqual(actual, expected) + self.assertEqual(expected, actual) self.assertEqual(list(summary.values())[0], 6) def test_erase_parallel(self): @@ -729,7 +729,7 @@ class ProcessTest(CoverageTest): infos = data.run_infos() self.assertEqual(len(infos), 1) expected = u"These are musical notes: ♫𝅗𝅥♩" - self.assertEqual(infos[0]['note'], expected) + self.assertEqual(expected, infos[0]['note']) @pytest.mark.expensive def test_fullcoverage(self): # pragma: no metacov diff --git a/tests/test_summary.py b/tests/test_summary.py index fa9a3158..60a96e64 100644 --- a/tests/test_summary.py +++ b/tests/test_summary.py @@ -267,7 +267,7 @@ class SummaryTest(UsingModulesMixin, CoverageTest): '---------------------------------------------------------', 'TOTAL 11 2 8 3 63%', ] - self.assertEqual(report_lines, expected) + self.assertEqual(expected, report_lines) def test_report_skip_covered_no_branches(self): self.make_file("main.py", """ @@ -530,7 +530,7 @@ class SummaryTest(UsingModulesMixin, CoverageTest): ) if env.PY2: expected = expected.encode(output_encoding()) - self.assertEqual(errmsg, expected) + self.assertEqual(expected, errmsg) def test_dotpy_not_python_ignored(self): # We run a .py file, and when reporting, we can't parse it as Python, |