File: conftest.py

package info (click to toggle)
basemap 2.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 213,536 kB
  • sloc: python: 11,826; sh: 45; makefile: 41
file content (20 lines) | stat: -rw-r--r-- 564 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
"""Configuration file for :mod:`mpl_toolkits.basemap` test suite.

The :mod:`mpl_toolkits.basemap` test suite is configured so that all
tests involving :mod:`mpl_toolkits.basemap` are run using the 'Agg'
backend, because there is no guarantee that another backend will be
available at runtime.
"""
from __future__ import absolute_import

import os
import sys

if "MPLBACKEND" not in os.environ:
    os.environ["MPLBACKEND"] = "Agg"

try:
    from mpl_toolkits import basemap
except ImportError:
    import basemap
    sys.modules["mpl_toolkits.basemap"] = basemap