annotate python/tests/utils.txt @ 31:c000f37c316d

moved tests to independent file, added chi2 computation
author Nicolas Saunier <nico@confins.net>
date Sat, 13 Feb 2010 19:46:33 -0500
parents
children 48e56179c39e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
31
c000f37c316d moved tests to independent file, added chi2 computation
Nicolas Saunier <nico@confins.net>
parents:
diff changeset
1 >>> from utils import *
c000f37c316d moved tests to independent file, added chi2 computation
Nicolas Saunier <nico@confins.net>
parents:
diff changeset
2 >>> from moving import Point
c000f37c316d moved tests to independent file, added chi2 computation
Nicolas Saunier <nico@confins.net>
parents:
diff changeset
3
c000f37c316d moved tests to independent file, added chi2 computation
Nicolas Saunier <nico@confins.net>
parents:
diff changeset
4 >>> computeChi2([],[])
c000f37c316d moved tests to independent file, added chi2 computation
Nicolas Saunier <nico@confins.net>
parents:
diff changeset
5 0.0
c000f37c316d moved tests to independent file, added chi2 computation
Nicolas Saunier <nico@confins.net>
parents:
diff changeset
6 >>> computeChi2(range(1,10),range(1,10))
c000f37c316d moved tests to independent file, added chi2 computation
Nicolas Saunier <nico@confins.net>
parents:
diff changeset
7 0.0
c000f37c316d moved tests to independent file, added chi2 computation
Nicolas Saunier <nico@confins.net>
parents:
diff changeset
8 >>> computeChi2(range(1,9),range(1,10))
c000f37c316d moved tests to independent file, added chi2 computation
Nicolas Saunier <nico@confins.net>
parents:
diff changeset
9 0.0
c000f37c316d moved tests to independent file, added chi2 computation
Nicolas Saunier <nico@confins.net>
parents:
diff changeset
10
c000f37c316d moved tests to independent file, added chi2 computation
Nicolas Saunier <nico@confins.net>
parents:
diff changeset
11 >>> segmentIntersection(Point(0,0),Point(1,1), Point(0,1), Point(1,2))
c000f37c316d moved tests to independent file, added chi2 computation
Nicolas Saunier <nico@confins.net>
parents:
diff changeset
12 >>> segmentIntersection(Point(0,1),Point(1,0), Point(0,2), Point(2,1))
c000f37c316d moved tests to independent file, added chi2 computation
Nicolas Saunier <nico@confins.net>
parents:
diff changeset
13 >>> segmentIntersection(Point(0,0),Point(2,0), Point(1,-1),Point(1,1))
c000f37c316d moved tests to independent file, added chi2 computation
Nicolas Saunier <nico@confins.net>
parents:
diff changeset
14 (1.000000,0.000000)
c000f37c316d moved tests to independent file, added chi2 computation
Nicolas Saunier <nico@confins.net>
parents:
diff changeset
15 >>> segmentIntersection(Point(0,1),Point(2,0),Point(1,1),Point(1,2))
c000f37c316d moved tests to independent file, added chi2 computation
Nicolas Saunier <nico@confins.net>
parents:
diff changeset
16
c000f37c316d moved tests to independent file, added chi2 computation
Nicolas Saunier <nico@confins.net>
parents:
diff changeset
17 >>> f = openCheck('non_existant_file.txt')
c000f37c316d moved tests to independent file, added chi2 computation
Nicolas Saunier <nico@confins.net>
parents:
diff changeset
18 File non_existant_file.txt could not be opened.
c000f37c316d moved tests to independent file, added chi2 computation
Nicolas Saunier <nico@confins.net>
parents:
diff changeset
19
c000f37c316d moved tests to independent file, added chi2 computation
Nicolas Saunier <nico@confins.net>
parents:
diff changeset
20 >>> removeExtension('test-adfasdf.asdfa.txt')
c000f37c316d moved tests to independent file, added chi2 computation
Nicolas Saunier <nico@confins.net>
parents:
diff changeset
21 'test-adfasdf.asdfa'
c000f37c316d moved tests to independent file, added chi2 computation
Nicolas Saunier <nico@confins.net>
parents:
diff changeset
22 >>> removeExtension('test-adfasdf')
c000f37c316d moved tests to independent file, added chi2 computation
Nicolas Saunier <nico@confins.net>
parents:
diff changeset
23 'test-adfasdf'