~ubuntu-branches/ubuntu/feisty/python-numpy/feisty

« back to all changes in this revision

Viewing changes to numpy/distutils/tests/swig_ext/tests/test_example.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2006-07-12 10:00:24 UTC
  • Revision ID: james.westby@ubuntu.com-20060712100024-5lw9q2yczlisqcrt
Tags: upstream-0.9.8
ImportĀ upstreamĀ versionĀ 0.9.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import sys
 
2
from numpy.testing import *
 
3
set_package_path()
 
4
from swig_ext import example
 
5
restore_path()
 
6
 
 
7
class test_example(ScipyTestCase):
 
8
 
 
9
    def check_fact(self):
 
10
        assert_equal(example.fact(10),3628800)
 
11
 
 
12
    def check_cvar(self):
 
13
        assert_equal(example.cvar.My_variable,3.0)
 
14
        example.cvar.My_variable = 5
 
15
        assert_equal(example.cvar.My_variable,5.0)
 
16
 
 
17
if __name__ == "__main__":
 
18
    ScipyTest().run()