# Path: lib/eofs/tests/reference.py
# def reference_multivariate_solution(container_type, weights):
#     """Obtain a reference multivariate EOF analysis solution.
# 
#     **Arguments:**
# 
#     *container_type*
#         Either 'standard', 'cdms', or 'iris'.
# 
#     *weights*
#         Weights method. One of 'equal', 'latitude', 'area',
#         'area_multi', or 'area_multi_mix'.
# 
#     """
#     if weights.lower() == 'area':
#         weights = 'area_multi'
#     if weights.lower() == 'none_area':
#         weights = 'area_multi_mix'
#     solution = reference_solution(container_type, weights)
#     nlon = len(solution['longitude'])
#     slice1 = slice(0, nlon // 2)
#     slice2 = slice(nlon // 2, None)
#     for var in ('longitude',
#                 'sst',
#                 'eofs',
#                 'eofscor',
#                 'eofscov',
#                 'weights',
#                 'rcon',):
#         try:
#             solution[var] = (solution[var][..., slice1],
#                              solution[var][..., slice2])
#         except TypeError:
#             solution[var] = None, None
#     return solution


import numpy as np
    import cdms2
import pytest
import eofs.multivariate as multivariate
from eofs.tests import EofsTest
from .reference import reference_multivariate_solution
# You should have received a copy of the GNU General Public License
# along with eofs.  If not, see <http://www.gnu.org/licenses/>.
from __future__ import (absolute_import, division, print_function)  # noqa

try:
except ImportError:
    pass




# Create a mapping from interface name to solver class.
solvers = {'standard': multivariate.standard.MultivariateEof}
try:
    solvers['cdms'] = multivariate.cdms.MultivariateEof
except AttributeError:
    pass
try:
    solvers['iris'] = multivariate.iris.MultivariateEof
except AttributeError:
    pass


class MVErrorHandlersTest(EofsTest):
    interface = None
    weights = None

    @classmethod
    def setup_class(cls):
        try:

# Path: lib/eofs/tests/reference.py
# def reference_multivariate_solution(container_type, weights):
#     """Obtain a reference multivariate EOF analysis solution.
# 
#     **Arguments:**
# 
#     *container_type*
#         Either 'standard', 'cdms', or 'iris'.
# 
#     *weights*
#         Weights method. One of 'equal', 'latitude', 'area',
#         'area_multi', or 'area_multi_mix'.
# 
#     """
#     if weights.lower() == 'area':
#         weights = 'area_multi'
#     if weights.lower() == 'none_area':
#         weights = 'area_multi_mix'
#     solution = reference_solution(container_type, weights)
#     nlon = len(solution['longitude'])
#     slice1 = slice(0, nlon // 2)
#     slice2 = slice(nlon // 2, None)
#     for var in ('longitude',
#                 'sst',
#                 'eofs',
#                 'eofscor',
#                 'eofscov',
#                 'weights',
#                 'rcon',):
#         try:
#             solution[var] = (solution[var][..., slice1],
#                              solution[var][..., slice2])
#         except TypeError:
#             solution[var] = None, None
#     return solution


# Path: lib/eofs/tests/test_multivariate_error_handling.py
import numpy as np
    import cdms2
import pytest
import eofs.multivariate as multivariate
from eofs.tests import EofsTest
from .reference import reference_multivariate_solution

# You should have received a copy of the GNU General Public License
# along with eofs.  If not, see <http://www.gnu.org/licenses/>.
from __future__ import (absolute_import, division, print_function)  # noqa

try:
except ImportError:
    pass




# Create a mapping from interface name to solver class.
solvers = {'standard': multivariate.standard.MultivariateEof}
try:
    solvers['cdms'] = multivariate.cdms.MultivariateEof
except AttributeError:
    pass
try:
    solvers['iris'] = multivariate.iris.MultivariateEof
except AttributeError:
    pass


class MVErrorHandlersTest(EofsTest):
    interface = None
    weights = None

    @classmethod
    def setup_class(cls):
        try:

            cls.solution = reference_multivariate_solution(cls.interface,