Skip to content

Commit 2cf60cf

Browse files
Use agg when testing plot methods (#170)
2 parents 3b094af + ebeda65 commit 2cf60cf

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Python_Engine/Python/tests/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
from pathlib import Path
22
import pandas as pd
3+
import matplotlib as mpl
4+
35

46
# identifier for all downstream processes
57
BASE_IDENTIFIER = "PythonBHoM_pytest"
@@ -9,4 +11,7 @@ def get_timeseries():
911
df = df.set_index(pd.to_datetime(df.index))
1012
return pd.Series(df["Value"], index=df.index)
1113

12-
TIMESERIES_COLLECTION = get_timeseries()
14+
TIMESERIES_COLLECTION = get_timeseries()
15+
16+
#use 'agg' for testing plot methods, as tkinter occasionally throws strange errors (missing component/library when component isn't missing) when the default backend is used only when using pytest
17+
mpl.use("agg")

0 commit comments

Comments
 (0)