Add a test argument to view method for LinePlot.
The default configuration for Plotter is interactive
in AttrConf.MPL_STYLE which sets the matplotlib context
as interactive. This calls the pyplot.draw() method that
invokes the image rendering even if the user's code does not
call .draw() or .show() explicitly.
We disable interactive for our tests
Change-Id: Ia62ef7700d00d61614aafe1472d0d36a6cbef7b8
Signed-off-by: Kapileshwar Singh <kapileshwar.singh@arm.com>
diff --git a/tests/test_duplicates.py b/tests/test_duplicates.py
index fbdc8da..73a4d9c 100644
--- a/tests/test_duplicates.py
+++ b/tests/test_duplicates.py
@@ -45,8 +45,7 @@
marker='o',
linestyle='none',
per_line=3)
- l.view()
- matplotlib.pyplot.close('all')
+ l.view(test=True)
def test_plotter_triplicates(self):
@@ -80,5 +79,4 @@
marker='o',
linestyle='none',
per_line=3)
- l.view()
- matplotlib.pyplot.close('all')
+ l.view(test=True)