• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

smythi93 / Tests4Py / 30040549735

23 Jul 2026 08:04PM UTC coverage: 23.663% (-21.5%) from 45.174%
30040549735

push

github

web-flow
Merge pull request #106 from smythi93/dev

Release 1.0.0 — complete benchmark coverage (328/328 reproducible bugs)

11882 of 64778 new or added lines in 1205 files covered. (18.34%)

46 existing lines in 14 files now uncovered.

18085 of 76426 relevant lines covered (23.66%)

0.24 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/tests4py/projects/resources/matplotlib/bug_4/unittests.py
NEW
1
import unittest
×
NEW
2
import matplotlib
×
NEW
3
matplotlib.use('Agg')
×
NEW
4
import matplotlib as mpl
×
NEW
5
import matplotlib.pyplot as plt
×
6

NEW
7
class TestsFailing(unittest.TestCase):
×
8

NEW
9
    def test_diversity_1(self):
×
NEW
10
        fig, ax = plt.subplots()
×
NEW
11
        with mpl.rc_context({'lines.color': 'orange'}):
×
NEW
12
            lines = ax.hlines(2.49, -0.02, 4.36)
×
NEW
13
            self.assertEqual(True, mpl.colors.same_color(lines.get_color(), 'orange'))
×
NEW
14
        plt.close(fig)
×
15

NEW
16
    def test_diversity_2(self):
×
NEW
17
        fig, ax = plt.subplots()
×
NEW
18
        with mpl.rc_context({'lines.color': 'cyan'}):
×
NEW
19
            lines = ax.vlines(0.86, -4.69, 0.03)
×
NEW
20
            self.assertEqual(True, mpl.colors.same_color(lines.get_color(), 'cyan'))
×
NEW
21
        plt.close(fig)
×
22

NEW
23
    def test_diversity_3(self):
×
NEW
24
        fig, ax = plt.subplots()
×
NEW
25
        with mpl.rc_context({'lines.color': 'brown'}):
×
NEW
26
            lines = ax.hlines(-3.43, -1.85, 1.67)
×
NEW
27
            self.assertEqual(True, mpl.colors.same_color(lines.get_color(), 'brown'))
×
NEW
28
        plt.close(fig)
×
29

NEW
30
    def test_diversity_4(self):
×
NEW
31
        fig, ax = plt.subplots()
×
NEW
32
        with mpl.rc_context({'lines.color': 'cyan'}):
×
NEW
33
            lines = ax.hlines(-1.45, -1.97, 2.88)
×
NEW
34
            self.assertEqual(True, mpl.colors.same_color(lines.get_color(), 'cyan'))
×
NEW
35
        plt.close(fig)
×
36

NEW
37
    def test_diversity_5(self):
×
NEW
38
        fig, ax = plt.subplots()
×
NEW
39
        with mpl.rc_context({'lines.color': 'brown'}):
×
NEW
40
            lines = ax.hlines(-2.42, -0.13, 2.22)
×
NEW
41
            self.assertEqual(True, mpl.colors.same_color(lines.get_color(), 'brown'))
×
NEW
42
        plt.close(fig)
×
43

NEW
44
    def test_diversity_6(self):
×
NEW
45
        fig, ax = plt.subplots()
×
NEW
46
        with mpl.rc_context({'lines.color': 'red'}):
×
NEW
47
            lines = ax.vlines(4.08, -0.48, 3.19)
×
NEW
48
            self.assertEqual(True, mpl.colors.same_color(lines.get_color(), 'red'))
×
NEW
49
        plt.close(fig)
×
50

NEW
51
    def test_diversity_7(self):
×
NEW
52
        fig, ax = plt.subplots()
×
NEW
53
        with mpl.rc_context({'lines.color': 'blue'}):
×
NEW
54
            lines = ax.vlines(-1.59, -4.54, -1.22)
×
NEW
55
            self.assertEqual(True, mpl.colors.same_color(lines.get_color(), 'blue'))
×
NEW
56
        plt.close(fig)
×
57

NEW
58
    def test_diversity_8(self):
×
NEW
59
        fig, ax = plt.subplots()
×
NEW
60
        with mpl.rc_context({'lines.color': 'purple'}):
×
NEW
61
            lines = ax.hlines(0.22, -0.93, 0.15)
×
NEW
62
            self.assertEqual(True, mpl.colors.same_color(lines.get_color(), 'purple'))
×
NEW
63
        plt.close(fig)
×
64

NEW
65
    def test_diversity_9(self):
×
NEW
66
        fig, ax = plt.subplots()
×
NEW
67
        with mpl.rc_context({'lines.color': 'brown'}):
×
NEW
68
            lines = ax.hlines(1.54, -2.34, 1.13)
×
NEW
69
            self.assertEqual(True, mpl.colors.same_color(lines.get_color(), 'brown'))
×
NEW
70
        plt.close(fig)
×
71

NEW
72
    def test_diversity_10(self):
×
NEW
73
        fig, ax = plt.subplots()
×
NEW
74
        with mpl.rc_context({'lines.color': 'magenta'}):
×
NEW
75
            lines = ax.hlines(1.16, -3.81, -0.76)
×
NEW
76
            self.assertEqual(True, mpl.colors.same_color(lines.get_color(), 'magenta'))
×
NEW
77
        plt.close(fig)
×
78

NEW
79
class TestsPassing(unittest.TestCase):
×
80

NEW
81
    def test_diversity_1(self):
×
NEW
82
        fig, ax = plt.subplots()
×
NEW
83
        with mpl.rc_context({'lines.color': 'k'}):
×
NEW
84
            lines = ax.hlines(0.1, -1.09, 3.28)
×
NEW
85
            self.assertEqual(True, mpl.colors.same_color(lines.get_color(), 'k'))
×
NEW
86
        plt.close(fig)
×
87

NEW
88
    def test_diversity_2(self):
×
NEW
89
        fig, ax = plt.subplots()
×
NEW
90
        with mpl.rc_context({'lines.color': '#000000'}):
×
NEW
91
            lines = ax.hlines(-2.88, -1.72, 0.43)
×
NEW
92
            self.assertEqual(True, mpl.colors.same_color(lines.get_color(), '#000000'))
×
NEW
93
        plt.close(fig)
×
94

NEW
95
    def test_diversity_3(self):
×
NEW
96
        fig, ax = plt.subplots()
×
NEW
97
        with mpl.rc_context({'lines.color': 'black'}):
×
NEW
98
            lines = ax.vlines(-0.94, -4.85, -1.93)
×
NEW
99
            self.assertEqual(True, mpl.colors.same_color(lines.get_color(), 'black'))
×
NEW
100
        plt.close(fig)
×
101

NEW
102
    def test_diversity_4(self):
×
NEW
103
        fig, ax = plt.subplots()
×
NEW
104
        with mpl.rc_context({'lines.color': 'black'}):
×
NEW
105
            lines = ax.vlines(3.39, -0.37, 0.7)
×
NEW
106
            self.assertEqual(True, mpl.colors.same_color(lines.get_color(), 'black'))
×
NEW
107
        plt.close(fig)
×
108

NEW
109
    def test_diversity_5(self):
×
NEW
110
        fig, ax = plt.subplots()
×
NEW
111
        with mpl.rc_context({'lines.color': '#000000'}):
×
NEW
112
            lines = ax.hlines(-1.15, -1.61, 3.09)
×
NEW
113
            self.assertEqual(True, mpl.colors.same_color(lines.get_color(), '#000000'))
×
NEW
114
        plt.close(fig)
×
115

NEW
116
    def test_diversity_6(self):
×
NEW
117
        fig, ax = plt.subplots()
×
NEW
118
        with mpl.rc_context({'lines.color': '#000000'}):
×
NEW
119
            lines = ax.hlines(4.0, -2.38, 2.07)
×
NEW
120
            self.assertEqual(True, mpl.colors.same_color(lines.get_color(), '#000000'))
×
NEW
121
        plt.close(fig)
×
122

NEW
123
    def test_diversity_7(self):
×
NEW
124
        fig, ax = plt.subplots()
×
NEW
125
        with mpl.rc_context({'lines.color': 'black'}):
×
NEW
126
            lines = ax.hlines(4.96, -0.52, 3.91)
×
NEW
127
            self.assertEqual(True, mpl.colors.same_color(lines.get_color(), 'black'))
×
NEW
128
        plt.close(fig)
×
129

NEW
130
    def test_diversity_8(self):
×
NEW
131
        fig, ax = plt.subplots()
×
NEW
132
        with mpl.rc_context({'lines.color': 'black'}):
×
NEW
133
            lines = ax.hlines(-1.32, -3.92, 2.05)
×
NEW
134
            self.assertEqual(True, mpl.colors.same_color(lines.get_color(), 'black'))
×
NEW
135
        plt.close(fig)
×
136

NEW
137
    def test_diversity_9(self):
×
NEW
138
        fig, ax = plt.subplots()
×
NEW
139
        with mpl.rc_context({'lines.color': 'black'}):
×
NEW
140
            lines = ax.vlines(4.61, -1.82, 2.97)
×
NEW
141
            self.assertEqual(True, mpl.colors.same_color(lines.get_color(), 'black'))
×
NEW
142
        plt.close(fig)
×
143

NEW
144
    def test_diversity_10(self):
×
NEW
145
        fig, ax = plt.subplots()
×
NEW
146
        with mpl.rc_context({'lines.color': 'k'}):
×
NEW
147
            lines = ax.vlines(2.45, -3.91, -0.05)
×
NEW
148
            self.assertEqual(True, mpl.colors.same_color(lines.get_color(), 'k'))
×
NEW
149
        plt.close(fig)
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc