comparison python/tests/utils.txt @ 152:74b1fc68d4df

re-organized code to avoid cyclic python module dependencies
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Tue, 06 Sep 2011 18:44:23 -0400
parents 1a2ac2d4f53a
children 5957aa1d69e1
comparison
equal deleted inserted replaced
151:4af774bb186d 152:74b1fc68d4df
11 >>> ceilDecimals(1.23, 0) 11 >>> ceilDecimals(1.23, 0)
12 2.0 12 2.0
13 >>> ceilDecimals(1.23, 1) 13 >>> ceilDecimals(1.23, 1)
14 1.3 14 1.3
15 15
16 >>> segmentIntersection(Point(0,0),Point(1,1), Point(0,1), Point(1,2)) 16 >>> inBetween(1,2,1.5)
17 >>> segmentIntersection(Point(0,1),Point(1,0), Point(0,2), Point(2,1)) 17 True
18 >>> segmentIntersection(Point(0,0),Point(2,0), Point(1,-1),Point(1,1)) 18 >>> inBetween(2.1,1,1.5)
19 (1.000000,0.000000) 19 True
20 >>> segmentIntersection(Point(0,1),Point(2,0),Point(1,1),Point(1,2)) 20 >>> inBetween(1,2,0)
21 False
21 22
22 >>> f = openCheck('non_existant_file.txt') 23 >>> f = openCheck('non_existant_file.txt')
23 File non_existant_file.txt could not be opened. 24 File non_existant_file.txt could not be opened.
24 25
25 >>> removeExtension('test-adfasdf.asdfa.txt') 26 >>> removeExtension('test-adfasdf.asdfa.txt')