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

ac-i2i-engineering / MatPlus / 13618812795

02 Mar 2025 08:00PM UTC coverage: 94.424% (+0.7%) from 93.763%
13618812795

Pull #12

github

BestLocation
Correct Documentation
Pull Request #12: Histogram adddition and documentation for lineplot

63 of 63 new or added lines in 2 files covered. (100.0%)

1 existing line in 1 file now uncovered.

508 of 538 relevant lines covered (94.42%)

8.28 hits per line

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

97.78
/tests/test_LinePlot.py
1
import matplotlib.pyplot as plt
12✔
2
from MatPlus.LinePlot import LinePlot
12✔
3

4

5
def test_lineplot_creation():
12✔
6
    x = [1, 2, 3]
12✔
7
    y = [1, 2, 3]
12✔
8
    plot = LinePlot(x, y)
12✔
9
    assert plot.x == x
12✔
10
    assert plot.y == y
12✔
11
    assert plot.lowerlimx is None
12✔
12
    assert plot.upperlimx is None
12✔
13
    assert plot.lowerlimy is None
12✔
14
    assert plot.upperlimy is None
12✔
15
    assert plot.width is None
12✔
UNCOV
16
    assert plot.linewidth is None
×
17

18

19
def test_lineplot_with_limits():
12✔
20
    x = [1, 2, 3]
12✔
21
    y = [1, 2, 3]
12✔
22
    plot = LinePlot(x, y, lowerlimx=0, upperlimx=4, lowerlimy=0, upperlimy=4)
12✔
23
    assert plot.lowerlimx == 0
12✔
24
    assert plot.upperlimx == 4
12✔
25
    assert plot.lowerlimy == 0
12✔
26
    assert plot.upperlimy == 4
12✔
27

28

29
def test_lineplot_with_linewidth():
12✔
30
    x = [1, 2, 3]
12✔
31
    y = [1, 2, 3]
12✔
32
    plot = LinePlot(x, y, lw=2.0)
12✔
33
    assert plot.linewidth == 2.0
12✔
34

35

36
def test_multiple_lines():
12✔
37
    x = [[1, 2, 3], [4, 5, 6]]
12✔
38
    y = [[1, 2, 3], [4, 5, 6]]
12✔
39
    plot = LinePlot(x, y)
12✔
40
    assert len(plot.x) == 2
12✔
41
    assert len(plot.y) == 2
12✔
42

43

44
def test_plot_creation():
12✔
45
    x = [1, 2, 3]
12✔
46
    y = [1, 2, 3]
12✔
47
    plot = LinePlot(x, y)
12✔
48
    plot.plot()
12✔
49
    plt.close()  # Cleanup
12✔
50

51

52
def test_plot_with_parameters():
12✔
53
    x = [1, 2, 3]
12✔
54
    y = [1, 2, 3]
12✔
55
    plot = LinePlot(x, y, lowerlimx=0, upperlimx=4, lowerlimy=0, upperlimy=4, lw=2.0)
12✔
56
    plot.plot()
12✔
57
    plt.close()  # Cleanup
12✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc