Skip to content

Commit

Permalink
Move import into setUp
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrnr committed Apr 11, 2016
1 parent c86c22d commit d4f6988
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions scot/tests/test_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,19 @@

import numpy as np

try:
import matplotlib.pyplot as plt
from matplotlib.image import AxesImage
from matplotlib.figure import Figure
matplotlib_failed = False
except ImportError:
matplotlib_failed = True

from scot.eegtopo.topoplot import Topoplot
from scot import plotting as sp
from scot.varbase import VARBase


class TestFunctionality(unittest.TestCase):
def setUp(self):
if matplotlib_failed:
self.skipTest("matplotlib not found.")
try:
import matplotlib.pyplot as plt
from matplotlib.image import AxesImage
from matplotlib.figure import Figure
except ImportError:
self.skipTest("could not import matplotlib")
self.locs = [[0, 0, 1], [1, 0, 0], [0, 1, 0], [-1, 0, 0], [0, -1, 0]]
self.vals = [[1, 0, 0, 0, 0], [0, 0, 0, 0, 0], [1, 1, 1, 1, 1] ]

Expand Down

0 comments on commit d4f6988

Please sign in to comment.