~ubuntu-branches/ubuntu/trusty/pynifti/trusty

« back to all changes in this revision

Viewing changes to tests/test_main.py

  • Committer: Bazaar Package Importer
  • Author(s): Michael Hanke, Michael Hanke, Yaroslav Halchenko
  • Date: 2007-09-17 08:32:59 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070917083259-8eg0pofquqdn7w00
Tags: 0.20070917.1-1
[ Michael Hanke ]
* Bugfix: Can now update NIfTI header data when no filename is set
  (Closes: #442175).
* Unloading of image data without a filename set is no checked and prevented
  as it would damage data integrity and the image data could not be
  recovered.

[ Yaroslav Halchenko ]
* Added 'pixdim' property.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ###
 
2
#
 
3
#    Main unit test interface for PyNIfTI
 
4
#
 
5
#    Copyright (C) 2007 by
 
6
#    Michael Hanke <michael.hanke@gmail.com>
 
7
#
 
8
#    This package is free software; you can redistribute it and/or
 
9
#    modify it under the terms of the GNU Lesser General Public
 
10
#    version 2 of the License, or (at your option) any later version.
 
11
#
 
12
#    This package is distributed in the hope that it will be useful,
 
13
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
15
#    Lesser General Public License for more details.
 
16
#
 
17
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ###
 
18
 
 
19
import unittest
 
20
 
 
21
# list all test modules (without .py extension)
 
22
tests = [ 'test_fileio',
 
23
          'test_utils',
 
24
        ]
 
25
 
 
26
 
 
27
# import all test modules
 
28
for t in tests:
 
29
    exec 'import ' + t
 
30
 
 
31
 
 
32
if __name__ == '__main__':
 
33
 
 
34
    # load all tests suites
 
35
    suites = [ eval(t + '.suite()') for t in tests ]
 
36
 
 
37
    # and make global test suite
 
38
    ts = unittest.TestSuite( suites )
 
39
 
 
40
    # finally run it
 
41
    unittest.TextTestRunner().run( ts )
 
42
 
 
43