Skip to content

Commit

Permalink
Test data now included in installation.
Browse files Browse the repository at this point in the history
Updated the MANIFEST.in so all test data is now included in the
installation (fixes #1). Furthermore added a __main__.py to the tests
directory, so that the tests can now be run from the command line with
    python -m mtspec.tests
  • Loading branch information
Lion Krischer committed Oct 4, 2012
1 parent 70eaf32 commit 269cf9d
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 14 deletions.
29 changes: 15 additions & 14 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
prune mtspec/src/bin
prune mtspec/src/data
prune mtspec/src/developing
prune mtspec/src/doc
prune mtspec/src/examples
prune mtspec/src/gplot
prune mtspec/src/libraries
prune mtspec/src/makefiles
prune mtspec/src/matlab
prune mtspec/src/modules
prune mtspec/src/plot
prune mtspec/src/plotxy
prune mtspec/src/programs
prune mtspec/src/splines
prune mtspec/src/data/*
prune mtspec/src/developing/*
prune mtspec/src/doc/*
prune mtspec/src/examples/*
prune mtspec/src/license/*
prune mtspec/src/Makefile
prune mtspec/src/makefiles/*
prune mtspec/src/Makefile.win
prune mtspec/src/matlab/*
prune mtspec/src/plot/*
prune mtspec/src/programs/*
prune mtspec/src/README
include mtspec/src/src/*
include mtspec/VERSION.txt
include mtspec/tests/data/*
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ python setup.py install
pip install .
```

### Running the tests

Running the tests is a simple case of

```bash
python -m mtspec.tests
```


### Notes

Expand Down
25 changes: 25 additions & 0 deletions mtspec/tests/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Simple test runner so the tests can be run with
python -m mtspec.tests
:copyright:
Lion Krischer (krischer@geophysik.uni-muenchen.de), 2012
:license:
GNU General Public License, Version 3
(http://www.gnu.org/copyleft/gpl.html)
"""

from mtspec.tests import test_multitaper
import unittest


def suite():
suite = unittest.TestSuite()
suite.addTest(test_multitaper.suite())
return suite

if __name__ == '__main__':
unittest.main(defaultTest='suite')

0 comments on commit 269cf9d

Please sign in to comment.