Changeset 6973 for anuga_core
- Timestamp:
- May 5, 2009, 6:24:13 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/pmesh/test_mesh_interface.py
r6199 r6973 671 671 672 672 def FIXME_test_create_mesh_with_multiply_tagged_segments(self): 673 """Test that create_mesh_from_regions fails when 674 segments are listed repeatedly in boundary_tags. 673 """Test that create_mesh_from_regions fails when segments are listed repeatedly in boundary_tags. 675 674 """ 676 675 677 678 679 676 # FIXME(Ole): Who wrote this and why doesn't it pass? 677 678 680 679 # These are the absolute values 681 680 min_x = 10 … … 701 700 702 701 703 702 m = create_mesh_from_regions(polygon, 703 boundary_tags, 704 10000000, 705 interior_regions=interior_regions) 704 706 try: 705 707 m = create_mesh_from_regions(polygon, … … 712 714 msg = 'Tags are listed repeatedly, but create mesh from regions ' 713 715 msg += 'does not cause an Exception to be raised' 714 raise msg 715 716 716 raise Exception, msg 717 718 719 720 def test_create_mesh_with_segments_out_of_bounds(self): 721 """Test that create_mesh_from_regions fails when a segment is out of bounds. 722 """ 723 724 # These are the absolute values 725 min_x = 10 726 min_y = 88 727 polygon = [[min_x,min_y],[1000,100],[1000,1000],[100,1000]] 728 729 730 boundary_tags = {'walls': [0,1], 'bom':[2,3], 'out': [5]} 731 732 # This one is inside bounding polygon - should pass 733 inner_polygon = [[800,400],[900,500],[800,600]] 734 735 interior_regions = [(inner_polygon, 5)] 736 737 738 try: 739 m = create_mesh_from_regions(polygon, 740 boundary_tags, 741 10000000, 742 interior_regions=interior_regions) 743 except: 744 pass 745 else: 746 msg = 'Tags are listed repeatedly, but create mesh from regions ' 747 msg += 'does not cause an Exception to be raised' 748 raise Exception, msg 749 750 717 751 718 752 … … 976 1010 #------------------------------------------------------------- 977 1011 if __name__ == "__main__": 978 suite = unittest.makeSuite(TestCase, 'test')1012 suite = unittest.makeSuite(TestCase, 'test') 979 1013 #suite = unittest.makeSuite(TestCase,'test_create_mesh_from_regions_check_segs') 980 1014 runner = unittest.TextTestRunner() #verbosity=2)
Note: See TracChangeset
for help on using the changeset viewer.