From e36475a387b734711fbbe84c0fe4b6d0777cd9ec Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 28 Oct 2021 06:19:16 -0400 Subject: refactor(test): name this gold file properly --- tests/gold/annotate/annotate/white.py,cover | 33 ----------------------------- tests/gold/annotate/white/white.py,cover | 33 +++++++++++++++++++++++++++++ tests/test_annotate.py | 2 +- 3 files changed, 34 insertions(+), 34 deletions(-) delete mode 100644 tests/gold/annotate/annotate/white.py,cover create mode 100644 tests/gold/annotate/white/white.py,cover (limited to 'tests') diff --git a/tests/gold/annotate/annotate/white.py,cover b/tests/gold/annotate/annotate/white.py,cover deleted file mode 100644 index 36b0b993..00000000 --- a/tests/gold/annotate/annotate/white.py,cover +++ /dev/null @@ -1,33 +0,0 @@ - # A test case sent to me by Steve White - -> def f(self): -! if self==1: -! pass -! elif self.m('fred'): -! pass -! elif (g==1) and (b==2): -! pass -! elif self.m('fred')==True: -! pass -! elif ((g==1) and (b==2))==True: -! pass -! else: -! pass - -> def g(x): -> if x == 1: -> a = 1 -! else: -! a = 2 - -> g(1) - -> def h(x): -- if 0: #pragma: no cover -- pass -> if x == 1: -! a = 1 -> else: -> a = 2 - -> h(2) diff --git a/tests/gold/annotate/white/white.py,cover b/tests/gold/annotate/white/white.py,cover new file mode 100644 index 00000000..36b0b993 --- /dev/null +++ b/tests/gold/annotate/white/white.py,cover @@ -0,0 +1,33 @@ + # A test case sent to me by Steve White + +> def f(self): +! if self==1: +! pass +! elif self.m('fred'): +! pass +! elif (g==1) and (b==2): +! pass +! elif self.m('fred')==True: +! pass +! elif ((g==1) and (b==2))==True: +! pass +! else: +! pass + +> def g(x): +> if x == 1: +> a = 1 +! else: +! a = 2 + +> g(1) + +> def h(x): +- if 0: #pragma: no cover +- pass +> if x == 1: +! a = 1 +> else: +> a = 2 + +> h(2) diff --git a/tests/test_annotate.py b/tests/test_annotate.py index f85450c7..15b31273 100644 --- a/tests/test_annotate.py +++ b/tests/test_annotate.py @@ -104,7 +104,7 @@ class AnnotationGoldTest(CoverageTest): cov = coverage.Coverage() self.start_import_stop(cov, "white") cov.annotate() - compare(gold_path("annotate/annotate"), ".", "*,cover") + compare(gold_path("annotate/white"), ".", "*,cover") def test_missing_after_else(self): self.make_file("mae.py", """\ -- cgit v1.2.1