~ubuntu-branches/ubuntu/lucid/python-scipy/lucid

« back to all changes in this revision

Viewing changes to Lib/sandbox/exmplpackage/tests/test_foo.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-01-07 14:12:12 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070107141212-mm0ebkh5b37hcpzn
* Remove build dependency on python-numpy-dev.
* python-scipy: Depend on python-numpy instead of python-numpy-dev.
* Package builds on other archs than i386. Closes: #402783.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
#
 
3
# Created by: Pearu Peterson, October 2003
 
4
# Adjusted to numpy.distutils: Pearu Peterson, October 2005
 
5
#
 
6
__usage__ = """
 
7
First ensure that scipy core modules are installed.
 
8
 
 
9
Build exmplpackage:
 
10
  python setup.py build
 
11
Run tests locally:
 
12
  python tests/test_foo.py [-l<int>] [-v<int>]
 
13
 
 
14
Run tests if scipy is installed:
 
15
  python -c 'import scipy;scipy.exmplpackage.test(level=<int>,verbosity=<int>)'
 
16
"""
 
17
 
 
18
import sys
 
19
from numpy.test.testing import *
 
20
 
 
21
set_package_path()
 
22
from exmplpackage.foo import *
 
23
del sys.path[0]
 
24
 
 
25
class test_foo_bar(ScipyTestCase):
 
26
 
 
27
    def check_simple(self, level=1):
 
28
        assert exmplpackage_foo_bar()=='Hello from exmplpackage_foo_bar'
 
29
 
 
30
class test_foo_gun(ScipyTestCase):
 
31
 
 
32
    def check_simple(self, level=1):
 
33
        assert foo_gun()=='Hello from foo_gun'
 
34
 
 
35
if __name__ == "__main__":
 
36
    ScipyTest().run()