Package mvpa :: Package tests :: Module test_base

[hide private]
[frames] | no frames]

# Source Code for Module mvpa.tests.test_base

     1  # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
     2  # vi: set ft=python sts=4 ts=4 sw=4 et:
     3  ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
     4  #
     5  #   See COPYING file distributed along with the PyMVPA package for the
     6  #   copyright and license terms.
     7  #
     8  ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
     9  """Test some base functionality which did not make it into a separate unittests"""
    10
    11  import unittest
    12  from tempfile import mktemp
    13
    14  from mvpa.base.info import wtf
    15
    16 -class TestBases(unittest.TestCase):
    17
    18 -    def testWtf(self):
    19          """Very basic testing -- just to see if it doesn't crash"""
    20
    21          try:
    22              wtf()
    23          except Exception, e:
    24              self.fail('Testing of systemInfo failed with "%s"' % str(e))
    25
    26          filename = mktemp('mvpa', 'test')
    27          wtf(filename)
    28          try:
    29              syslines = open(filename, 'r').readlines()
    30          except Exception, e:
    31              self.fail('Testing of dumping systemInfo into a file failed: %s' % str(e))
    32
    33 -def suite():
    34      return unittest.makeSuite(TestBases)
    35
    36
    37  if __name__ == '__main__':
    38      import runner
    39