Changeset 5934


Ignore:
Timestamp:
Nov 10, 2008, 5:56:26 PM (14 years ago)
Author:
ole
Message:

Removed reference to numpy in new polygon tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/utilities/test_polygon.py

    r5933 r5934  
    710710        self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' %
    711711                               (str(status), str(value)))
    712         self.failUnless(numpy.allclose(value, line0))
     712        self.failUnless(allclose(value, line0))
    713713
    714714        # line0 fully within line1, same direction
     
    722722        self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' %
    723723                               (str(status), str(value)))
    724         self.failUnless(numpy.allclose(value, line0))
     724        self.failUnless(allclose(value, line0))
    725725
    726726        # line0 fully within line1, opposite direction
     
    734734        self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' %
    735735                               (str(status), str(value)))
    736         self.failUnless(numpy.allclose(value, line0))
     736        self.failUnless(allclose(value, line0))
    737737
    738738        # line0 fully within line1, opposite direction
     
    746746        self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' %
    747747                               (str(status), str(value)))
    748         self.failUnless(numpy.allclose(value, line0))
     748        self.failUnless(allclose(value, line0))
    749749
    750750        # line1 fully within line0, same direction
     
    758758        self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' %
    759759                               (str(status), str(value)))
    760         self.failUnless(numpy.allclose(value, line1))
     760        self.failUnless(allclose(value, line1))
    761761
    762762        # line1 fully within line0, same direction
     
    770770        self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' %
    771771                               (str(status), str(value)))
    772         self.failUnless(numpy.allclose(value, line1))
     772        self.failUnless(allclose(value, line1))
    773773
    774774        # line1 fully within line0, opposite direction
     
    782782        self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' %
    783783                               (str(status), str(value)))
    784         self.failUnless(numpy.allclose(value, line1))
     784        self.failUnless(allclose(value, line1))
    785785
    786786        # line1 fully within line0, opposite direction
     
    794794        self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' %
    795795                               (str(status), str(value)))
    796         self.failUnless(numpy.allclose(value, line1))
     796        self.failUnless(allclose(value, line1))
    797797
    798798        # line in same direction, partial overlap
     
    806806        self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' %
    807807                               (str(status), str(value)))
    808         self.failUnless(numpy.allclose(value, [line1[0],line0[1]]))
     808        self.failUnless(allclose(value, [line1[0],line0[1]]))
    809809
    810810        # line in same direction, partial overlap
     
    818818        self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' %
    819819                               (str(status), str(value)))
    820         self.failUnless(numpy.allclose(value, [line0[0],line1[1]]))
     820        self.failUnless(allclose(value, [line0[0],line1[1]]))
    821821
    822822        # line in opposite direction, partial overlap
     
    830830        self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' %
    831831                               (str(status), str(value)))
    832         self.failUnless(numpy.allclose(value, [line0[0],line1[0]]))
     832        self.failUnless(allclose(value, [line0[0],line1[0]]))
    833833
    834834        # line in opposite direction, partial overlap
     
    842842        self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' %
    843843                               (str(status), str(value)))
    844         self.failUnless(numpy.allclose(value, [line1[1],line0[1]]))
     844        self.failUnless(allclose(value, [line1[1],line0[1]]))
    845845
    846846        # line in same direction, partial overlap
     
    854854        self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' %
    855855                               (str(status), str(value)))
    856         self.failUnless(numpy.allclose(value, [line0[0],line1[1]]))
     856        self.failUnless(allclose(value, [line0[0],line1[1]]))
    857857
    858858        # line in same direction, partial overlap
     
    866866        self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' %
    867867                               (str(status), str(value)))
    868         self.failUnless(numpy.allclose(value, [line1[0],line0[1]]))
     868        self.failUnless(allclose(value, [line1[0],line0[1]]))
    869869
    870870        # line in opposite direction, partial overlap
     
    878878        self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' %
    879879                               (str(status), str(value)))
    880         self.failUnless(numpy.allclose(value, [line1[1],line0[1]]))
     880        self.failUnless(allclose(value, [line1[1],line0[1]]))
    881881
    882882        # line in opposite direction, partial overlap
     
    890890        self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' %
    891891                               (str(status), str(value)))
    892         self.failUnless(numpy.allclose(value, [line0[0],line1[0]]))
     892        self.failUnless(allclose(value, [line0[0],line1[0]]))
    893893
    894894       
Note: See TracChangeset for help on using the changeset viewer.