Changeset 5934
- Timestamp:
- Nov 10, 2008, 5:56:26 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/utilities/test_polygon.py
r5933 r5934 710 710 self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' % 711 711 (str(status), str(value))) 712 self.failUnless( numpy.allclose(value, line0))712 self.failUnless(allclose(value, line0)) 713 713 714 714 # line0 fully within line1, same direction … … 722 722 self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' % 723 723 (str(status), str(value))) 724 self.failUnless( numpy.allclose(value, line0))724 self.failUnless(allclose(value, line0)) 725 725 726 726 # line0 fully within line1, opposite direction … … 734 734 self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' % 735 735 (str(status), str(value))) 736 self.failUnless( numpy.allclose(value, line0))736 self.failUnless(allclose(value, line0)) 737 737 738 738 # line0 fully within line1, opposite direction … … 746 746 self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' % 747 747 (str(status), str(value))) 748 self.failUnless( numpy.allclose(value, line0))748 self.failUnless(allclose(value, line0)) 749 749 750 750 # line1 fully within line0, same direction … … 758 758 self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' % 759 759 (str(status), str(value))) 760 self.failUnless( numpy.allclose(value, line1))760 self.failUnless(allclose(value, line1)) 761 761 762 762 # line1 fully within line0, same direction … … 770 770 self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' % 771 771 (str(status), str(value))) 772 self.failUnless( numpy.allclose(value, line1))772 self.failUnless(allclose(value, line1)) 773 773 774 774 # line1 fully within line0, opposite direction … … 782 782 self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' % 783 783 (str(status), str(value))) 784 self.failUnless( numpy.allclose(value, line1))784 self.failUnless(allclose(value, line1)) 785 785 786 786 # line1 fully within line0, opposite direction … … 794 794 self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' % 795 795 (str(status), str(value))) 796 self.failUnless( numpy.allclose(value, line1))796 self.failUnless(allclose(value, line1)) 797 797 798 798 # line in same direction, partial overlap … … 806 806 self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' % 807 807 (str(status), str(value))) 808 self.failUnless( numpy.allclose(value, [line1[0],line0[1]]))808 self.failUnless(allclose(value, [line1[0],line0[1]])) 809 809 810 810 # line in same direction, partial overlap … … 818 818 self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' % 819 819 (str(status), str(value))) 820 self.failUnless( numpy.allclose(value, [line0[0],line1[1]]))820 self.failUnless(allclose(value, [line0[0],line1[1]])) 821 821 822 822 # line in opposite direction, partial overlap … … 830 830 self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' % 831 831 (str(status), str(value))) 832 self.failUnless( numpy.allclose(value, [line0[0],line1[0]]))832 self.failUnless(allclose(value, [line0[0],line1[0]])) 833 833 834 834 # line in opposite direction, partial overlap … … 842 842 self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' % 843 843 (str(status), str(value))) 844 self.failUnless( numpy.allclose(value, [line1[1],line0[1]]))844 self.failUnless(allclose(value, [line1[1],line0[1]])) 845 845 846 846 # line in same direction, partial overlap … … 854 854 self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' % 855 855 (str(status), str(value))) 856 self.failUnless( numpy.allclose(value, [line0[0],line1[1]]))856 self.failUnless(allclose(value, [line0[0],line1[1]])) 857 857 858 858 # line in same direction, partial overlap … … 866 866 self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' % 867 867 (str(status), str(value))) 868 self.failUnless( numpy.allclose(value, [line1[0],line0[1]]))868 self.failUnless(allclose(value, [line1[0],line0[1]])) 869 869 870 870 # line in opposite direction, partial overlap … … 878 878 self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' % 879 879 (str(status), str(value))) 880 self.failUnless( numpy.allclose(value, [line1[1],line0[1]]))880 self.failUnless(allclose(value, [line1[1],line0[1]])) 881 881 882 882 # line in opposite direction, partial overlap … … 890 890 self.failIf(status!=2, 'Expected status 2, got status=%s, value=%s' % 891 891 (str(status), str(value))) 892 self.failUnless( numpy.allclose(value, [line0[0],line1[0]]))892 self.failUnless(allclose(value, [line0[0],line1[0]])) 893 893 894 894
Note: See TracChangeset
for help on using the changeset viewer.