Commit 1c3c893e authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Fixed matplotlib.use() issue.

parent 44b7b4e5
Pipeline #1443 passed with stage
in 10 minutes and 31 seconds
......@@ -10,13 +10,9 @@ Tests for gms_preprocessing.algorithms.L2B_P.KMeansRSImage
import unittest
import os
import matplotlib
import numpy as np
from sklearn.cluster import k_means_
matplotlib.use('Template') # disables matplotlib figure popups
from geoarray import GeoArray # noqa E402 module level import not at top of file
from gms_preprocessing import __file__ # noqa E402 module level import not at top of file
......@@ -39,6 +35,8 @@ class Test_KMeansRSImage(unittest.TestCase):
cls.kmeans = KMeansRSImage(cls.geoArr, n_clusters=10)
os.environ['MPLBACKEND'] = 'Template' # disables matplotlib figure popups # NOTE: import geoarray sets 'Agg'
def test_compute_clusters(self):
self.assertIsInstance(self.kmeans.clusters, k_means_.KMeans)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment