Changeset 2028
- Timestamp:
- Nov 15, 2005, 11:04:28 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/pmesh/test_mesh.py
r2024 r2028 417 417 m.generateMesh("QApz", maxArea = 2.1 ) 418 418 419 m.export_mesh_file("from_test_mesh.tsh") 419 420 seg = m.getMeshSegments() 420 421 #print "seg",seg … … 422 423 #print seg[0].tag 423 424 #print "seg[0].tag" 424 self.failUnless(seg[0].tag == 5 and 425 426 if sys.platform == 'win32': #Windows 427 self.failUnless(seg[0].tag == 5 and 425 428 seg[1].tag == 7 and 426 429 seg[2].tag == 9 and … … 430 433 seg[6].tag == 5, 431 434 'seg tags are wrong') 435 else: 436 self.failUnless(seg[0].tag == 5 and 437 seg[1].tag == 7 and 438 seg[2].tag == 9 and 439 seg[3].tag == 7 and 440 seg[4].tag == 9, 441 'seg tags are wrong') 442 432 443 433 444 def test_segtag2(self): … … 470 481 471 482 m.generateMesh("QApz", maxArea = 2.1 ) 472 473 483 seg = m.getMeshSegments() 474 484 … … 909 919 910 920 fileName = tempfile.mktemp(".xya") 921 #fileName = 't.xya' 922 #os.remove(fileName) 923 m.export_mesh_file('m.tsh') 911 924 m.exportPointsFile(fileName) 912 925 file = open(fileName) … … 918 931 lFile[1] == "0,0" and 919 932 lFile[2] == "0,3" and 920 lFile[3] == "3,3" and 921 lFile[4] == "1,2" and 933 lFile[3] == "3,3" 934 , 935 'exported Ascii xya file is wrong') 936 self.failUnless(lFile[4] == "1,2" and 922 937 lFile[5] == "3,1" 923 938 , … … 926 941 m.generateMesh("QApz", maxArea = 2.1) 927 942 fileName = tempfile.mktemp(".xya") 943 fileName = 't.xya' 928 944 m.exportPointsFile(fileName) 929 945 file = open(fileName) 930 946 lFile = file.read().split('\n') 931 947 file.close() 932 os.remove(fileName)948 #os.remove(fileName) 933 949 self.failUnless(lFile[0] == "" and 934 950 lFile[1] == "0.0,0.0" and
Note: See TracChangeset
for help on using the changeset viewer.