"""
This module is not a test file. It contains classes grouping some common
functionality, that is used in several test files.
"""
from __future__ import absolute_import
from sfepy.base.base import IndexedStruct
from sfepy.base.testing import TestCommon
import os.path as op

class NLSStatus(IndexedStruct):
    """
    Custom nonlinear solver status storing stopping condition of all
    time steps.
    """
    def __setitem__(self, key, val):
        IndexedStruct.__setitem__(self, key, val)
        if key == 'condition':
            self.conditions.append(val)

class TestDummy(TestCommon):
    """Simulate test OK result for missing optional modules."""

    @staticmethod
    def from_conf(conf, options):
        return TestDummy()

    def test_dummy(self):
        return True


class TestInput(TestCommon):
    """Test that an input file works. See test_input_*.py files."""

    @staticmethod
    def from_conf(conf, options, cls=None):
        from sfepy.base.base import Struct
        from sfepy.base.conf import ProblemConf, get_standard_keywords
        from sfepy.applications import assign_standard_hooks

        required, other = 
get_standard_keywords()