• 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_23/unittests.py
NEW
1
import unittest
×
NEW
2
import matplotlib
×
NEW
3
matplotlib.use('Agg')
×
NEW
4
import matplotlib.pyplot as plt
×
5

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

NEW
8
    def test_diversity_1(self):
×
NEW
9
        fig = plt.figure(figsize=(10, 10))
×
NEW
10
        ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
×
NEW
11
        ax.plot([0.4, 0.6], [0.4, 0.6])
×
NEW
12
        ax.set(xscale='log', xlim=(1.534, 237.412), yscale='logit', ylim=(1 / 101, 1 / 11), aspect=1, adjustable='datalim')
×
NEW
13
        ax.margins(0)
×
NEW
14
        ax.apply_aspect()
×
NEW
15
        cur = ax.get_xlim()
×
NEW
16
        unchanged = abs(cur[0] - 1.534) < 1e-06 and abs(cur[1] - 237.412) < 1e-06
×
NEW
17
        self.assertEqual(False, unchanged)
×
NEW
18
        plt.close(fig)
×
19

NEW
20
    def test_diversity_2(self):
×
NEW
21
        fig = plt.figure(figsize=(10, 10))
×
NEW
22
        ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
×
NEW
23
        ax.plot([0.4, 0.6], [0.4, 0.6])
×
NEW
24
        ax.set(xscale='log', xlim=(1.924, 553.475), yscale='logit', ylim=(1 / 101, 1 / 11), aspect=1, adjustable='datalim')
×
NEW
25
        ax.margins(0)
×
NEW
26
        ax.apply_aspect()
×
NEW
27
        cur = ax.get_xlim()
×
NEW
28
        unchanged = abs(cur[0] - 1.924) < 1e-06 and abs(cur[1] - 553.475) < 1e-06
×
NEW
29
        self.assertEqual(False, unchanged)
×
NEW
30
        plt.close(fig)
×
31

NEW
32
    def test_diversity_3(self):
×
NEW
33
        fig = plt.figure(figsize=(10, 10))
×
NEW
34
        ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
×
NEW
35
        ax.plot([0.4, 0.6], [0.4, 0.6])
×
NEW
36
        ax.set(xscale='log', xlim=(0.834, 207.554), yscale='logit', ylim=(1 / 101, 1 / 11), aspect=1, adjustable='datalim')
×
NEW
37
        ax.margins(0)
×
NEW
38
        ax.apply_aspect()
×
NEW
39
        cur = ax.get_xlim()
×
NEW
40
        unchanged = abs(cur[0] - 0.834) < 1e-06 and abs(cur[1] - 207.554) < 1e-06
×
NEW
41
        self.assertEqual(False, unchanged)
×
NEW
42
        plt.close(fig)
×
43

NEW
44
    def test_diversity_4(self):
×
NEW
45
        fig = plt.figure(figsize=(10, 10))
×
NEW
46
        ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
×
NEW
47
        ax.plot([0.4, 0.6], [0.4, 0.6])
×
NEW
48
        ax.set(xscale='log', xlim=(1.286, 311.674), yscale='logit', ylim=(1 / 101, 1 / 11), aspect=1, adjustable='datalim')
×
NEW
49
        ax.margins(0)
×
NEW
50
        ax.apply_aspect()
×
NEW
51
        cur = ax.get_xlim()
×
NEW
52
        unchanged = abs(cur[0] - 1.286) < 1e-06 and abs(cur[1] - 311.674) < 1e-06
×
NEW
53
        self.assertEqual(False, unchanged)
×
NEW
54
        plt.close(fig)
×
55

NEW
56
    def test_diversity_5(self):
×
NEW
57
        fig = plt.figure(figsize=(10, 10))
×
NEW
58
        ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
×
NEW
59
        ax.plot([0.4, 0.6], [0.4, 0.6])
×
NEW
60
        ax.set(xscale='log', xlim=(1.671, 362.344), yscale='logit', ylim=(1 / 101, 1 / 11), aspect=1, adjustable='datalim')
×
NEW
61
        ax.margins(0)
×
NEW
62
        ax.apply_aspect()
×
NEW
63
        cur = ax.get_xlim()
×
NEW
64
        unchanged = abs(cur[0] - 1.671) < 1e-06 and abs(cur[1] - 362.344) < 1e-06
×
NEW
65
        self.assertEqual(False, unchanged)
×
NEW
66
        plt.close(fig)
×
67

NEW
68
    def test_diversity_6(self):
×
NEW
69
        fig = plt.figure(figsize=(10, 10))
×
NEW
70
        ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
×
NEW
71
        ax.plot([0.4, 0.6], [0.4, 0.6])
×
NEW
72
        ax.set(xscale='log', xlim=(1.742, 596.583), yscale='logit', ylim=(1 / 101, 1 / 11), aspect=1, adjustable='datalim')
×
NEW
73
        ax.margins(0)
×
NEW
74
        ax.apply_aspect()
×
NEW
75
        cur = ax.get_xlim()
×
NEW
76
        unchanged = abs(cur[0] - 1.742) < 1e-06 and abs(cur[1] - 596.583) < 1e-06
×
NEW
77
        self.assertEqual(False, unchanged)
×
NEW
78
        plt.close(fig)
×
79

NEW
80
    def test_diversity_7(self):
×
NEW
81
        fig = plt.figure(figsize=(10, 10))
×
NEW
82
        ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
×
NEW
83
        ax.plot([0.4, 0.6], [0.4, 0.6])
×
NEW
84
        ax.set(xscale='log', xlim=(1.954, 357.616), yscale='logit', ylim=(1 / 101, 1 / 11), aspect=1, adjustable='datalim')
×
NEW
85
        ax.margins(0)
×
NEW
86
        ax.apply_aspect()
×
NEW
87
        cur = ax.get_xlim()
×
NEW
88
        unchanged = abs(cur[0] - 1.954) < 1e-06 and abs(cur[1] - 357.616) < 1e-06
×
NEW
89
        self.assertEqual(False, unchanged)
×
NEW
90
        plt.close(fig)
×
91

NEW
92
    def test_diversity_8(self):
×
NEW
93
        fig = plt.figure(figsize=(10, 10))
×
NEW
94
        ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
×
NEW
95
        ax.plot([0.4, 0.6], [0.4, 0.6])
×
NEW
96
        ax.set(xscale='log', xlim=(1.149, 342.264), yscale='logit', ylim=(1 / 101, 1 / 11), aspect=1, adjustable='datalim')
×
NEW
97
        ax.margins(0)
×
NEW
98
        ax.apply_aspect()
×
NEW
99
        cur = ax.get_xlim()
×
NEW
100
        unchanged = abs(cur[0] - 1.149) < 1e-06 and abs(cur[1] - 342.264) < 1e-06
×
NEW
101
        self.assertEqual(False, unchanged)
×
NEW
102
        plt.close(fig)
×
103

NEW
104
    def test_diversity_9(self):
×
NEW
105
        fig = plt.figure(figsize=(10, 10))
×
NEW
106
        ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
×
NEW
107
        ax.plot([0.4, 0.6], [0.4, 0.6])
×
NEW
108
        ax.set(xscale='log', xlim=(1.05, 337.193), yscale='logit', ylim=(1 / 101, 1 / 11), aspect=1, adjustable='datalim')
×
NEW
109
        ax.margins(0)
×
NEW
110
        ax.apply_aspect()
×
NEW
111
        cur = ax.get_xlim()
×
NEW
112
        unchanged = abs(cur[0] - 1.05) < 1e-06 and abs(cur[1] - 337.193) < 1e-06
×
NEW
113
        self.assertEqual(False, unchanged)
×
NEW
114
        plt.close(fig)
×
115

NEW
116
    def test_diversity_10(self):
×
NEW
117
        fig = plt.figure(figsize=(10, 10))
×
NEW
118
        ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
×
NEW
119
        ax.plot([0.4, 0.6], [0.4, 0.6])
×
NEW
120
        ax.set(xscale='log', xlim=(0.594, 122.55), yscale='logit', ylim=(1 / 101, 1 / 11), aspect=1, adjustable='datalim')
×
NEW
121
        ax.margins(0)
×
NEW
122
        ax.apply_aspect()
×
NEW
123
        cur = ax.get_xlim()
×
NEW
124
        unchanged = abs(cur[0] - 0.594) < 1e-06 and abs(cur[1] - 122.55) < 1e-06
×
NEW
125
        self.assertEqual(False, unchanged)
×
NEW
126
        plt.close(fig)
×
127

NEW
128
class TestsPassing(unittest.TestCase):
×
129

NEW
130
    def test_diversity_1(self):
×
NEW
131
        fig = plt.figure(figsize=(10, 10))
×
NEW
132
        ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
×
NEW
133
        ax.plot([0.4, 0.6], [0.4, 0.6])
×
NEW
134
        ax.set(xscale='log', xlim=(1.181, 467.585), yscale='logit', ylim=(1 / 101, 1 / 11), aspect=1, adjustable='box')
×
NEW
135
        ax.margins(0)
×
NEW
136
        ax.apply_aspect()
×
NEW
137
        cur = ax.get_xlim()
×
NEW
138
        unchanged = abs(cur[0] - 1.181) < 1e-06 and abs(cur[1] - 467.585) < 1e-06
×
NEW
139
        self.assertEqual(True, unchanged)
×
NEW
140
        plt.close(fig)
×
141

NEW
142
    def test_diversity_2(self):
×
NEW
143
        fig = plt.figure(figsize=(10, 10))
×
NEW
144
        ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
×
NEW
145
        ax.plot([0.4, 0.6], [0.4, 0.6])
×
NEW
146
        ax.set(xscale='log', xlim=(1.159, 259.334), yscale='logit', ylim=(1 / 101, 1 / 11), aspect=1, adjustable='box')
×
NEW
147
        ax.margins(0)
×
NEW
148
        ax.apply_aspect()
×
NEW
149
        cur = ax.get_xlim()
×
NEW
150
        unchanged = abs(cur[0] - 1.159) < 1e-06 and abs(cur[1] - 259.334) < 1e-06
×
NEW
151
        self.assertEqual(True, unchanged)
×
NEW
152
        plt.close(fig)
×
153

NEW
154
    def test_diversity_3(self):
×
NEW
155
        fig = plt.figure(figsize=(10, 10))
×
NEW
156
        ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
×
NEW
157
        ax.plot([0.4, 0.6], [0.4, 0.6])
×
NEW
158
        ax.set(xscale='log', xlim=(1.017, 357.842), yscale='logit', ylim=(1 / 101, 1 / 11), aspect=1, adjustable='box')
×
NEW
159
        ax.margins(0)
×
NEW
160
        ax.apply_aspect()
×
NEW
161
        cur = ax.get_xlim()
×
NEW
162
        unchanged = abs(cur[0] - 1.017) < 1e-06 and abs(cur[1] - 357.842) < 1e-06
×
NEW
163
        self.assertEqual(True, unchanged)
×
NEW
164
        plt.close(fig)
×
165

NEW
166
    def test_diversity_4(self):
×
NEW
167
        fig = plt.figure(figsize=(10, 10))
×
NEW
168
        ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
×
NEW
169
        ax.plot([0.4, 0.6], [0.4, 0.6])
×
NEW
170
        ax.set(xscale='log', xlim=(0.559, 141.378), yscale='logit', ylim=(1 / 101, 1 / 11), aspect=1, adjustable='box')
×
NEW
171
        ax.margins(0)
×
NEW
172
        ax.apply_aspect()
×
NEW
173
        cur = ax.get_xlim()
×
NEW
174
        unchanged = abs(cur[0] - 0.559) < 1e-06 and abs(cur[1] - 141.378) < 1e-06
×
NEW
175
        self.assertEqual(True, unchanged)
×
NEW
176
        plt.close(fig)
×
177

NEW
178
    def test_diversity_5(self):
×
NEW
179
        fig = plt.figure(figsize=(10, 10))
×
NEW
180
        ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
×
NEW
181
        ax.plot([0.4, 0.6], [0.4, 0.6])
×
NEW
182
        ax.set(xscale='log', xlim=(0.57, 95.925), yscale='logit', ylim=(1 / 101, 1 / 11), aspect=1, adjustable='box')
×
NEW
183
        ax.margins(0)
×
NEW
184
        ax.apply_aspect()
×
NEW
185
        cur = ax.get_xlim()
×
NEW
186
        unchanged = abs(cur[0] - 0.57) < 1e-06 and abs(cur[1] - 95.925) < 1e-06
×
NEW
187
        self.assertEqual(True, unchanged)
×
NEW
188
        plt.close(fig)
×
189

NEW
190
    def test_diversity_6(self):
×
NEW
191
        fig = plt.figure(figsize=(10, 10))
×
NEW
192
        ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
×
NEW
193
        ax.plot([0.4, 0.6], [0.4, 0.6])
×
NEW
194
        ax.set(xscale='log', xlim=(0.669, 210.777), yscale='logit', ylim=(1 / 101, 1 / 11), aspect=1, adjustable='box')
×
NEW
195
        ax.margins(0)
×
NEW
196
        ax.apply_aspect()
×
NEW
197
        cur = ax.get_xlim()
×
NEW
198
        unchanged = abs(cur[0] - 0.669) < 1e-06 and abs(cur[1] - 210.777) < 1e-06
×
NEW
199
        self.assertEqual(True, unchanged)
×
NEW
200
        plt.close(fig)
×
201

NEW
202
    def test_diversity_7(self):
×
NEW
203
        fig = plt.figure(figsize=(10, 10))
×
NEW
204
        ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
×
NEW
205
        ax.plot([0.4, 0.6], [0.4, 0.6])
×
NEW
206
        ax.set(xscale='log', xlim=(1.428, 243.568), yscale='logit', ylim=(1 / 101, 1 / 11), aspect=1, adjustable='box')
×
NEW
207
        ax.margins(0)
×
NEW
208
        ax.apply_aspect()
×
NEW
209
        cur = ax.get_xlim()
×
NEW
210
        unchanged = abs(cur[0] - 1.428) < 1e-06 and abs(cur[1] - 243.568) < 1e-06
×
NEW
211
        self.assertEqual(True, unchanged)
×
NEW
212
        plt.close(fig)
×
213

NEW
214
    def test_diversity_8(self):
×
NEW
215
        fig = plt.figure(figsize=(10, 10))
×
NEW
216
        ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
×
NEW
217
        ax.plot([0.4, 0.6], [0.4, 0.6])
×
NEW
218
        ax.set(xscale='log', xlim=(1.464, 436.423), yscale='logit', ylim=(1 / 101, 1 / 11), aspect=1, adjustable='box')
×
NEW
219
        ax.margins(0)
×
NEW
220
        ax.apply_aspect()
×
NEW
221
        cur = ax.get_xlim()
×
NEW
222
        unchanged = abs(cur[0] - 1.464) < 1e-06 and abs(cur[1] - 436.423) < 1e-06
×
NEW
223
        self.assertEqual(True, unchanged)
×
NEW
224
        plt.close(fig)
×
225

NEW
226
    def test_diversity_9(self):
×
NEW
227
        fig = plt.figure(figsize=(10, 10))
×
NEW
228
        ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
×
NEW
229
        ax.plot([0.4, 0.6], [0.4, 0.6])
×
NEW
230
        ax.set(xscale='log', xlim=(1.683, 427.067), yscale='logit', ylim=(1 / 101, 1 / 11), aspect=1, adjustable='box')
×
NEW
231
        ax.margins(0)
×
NEW
232
        ax.apply_aspect()
×
NEW
233
        cur = ax.get_xlim()
×
NEW
234
        unchanged = abs(cur[0] - 1.683) < 1e-06 and abs(cur[1] - 427.067) < 1e-06
×
NEW
235
        self.assertEqual(True, unchanged)
×
NEW
236
        plt.close(fig)
×
237

NEW
238
    def test_diversity_10(self):
×
NEW
239
        fig = plt.figure(figsize=(10, 10))
×
NEW
240
        ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
×
NEW
241
        ax.plot([0.4, 0.6], [0.4, 0.6])
×
NEW
242
        ax.set(xscale='log', xlim=(1.471, 425.274), yscale='logit', ylim=(1 / 101, 1 / 11), aspect=1, adjustable='box')
×
NEW
243
        ax.margins(0)
×
NEW
244
        ax.apply_aspect()
×
NEW
245
        cur = ax.get_xlim()
×
NEW
246
        unchanged = abs(cur[0] - 1.471) < 1e-06 and abs(cur[1] - 425.274) < 1e-06
×
NEW
247
        self.assertEqual(True, unchanged)
×
NEW
248
        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