Merge remote-tracking branch 'origin/development' into fix-elem-7-57

This commit is contained in:
Martin Diehl 2020-01-27 19:23:35 +01:00
commit 6636f56cab
5 changed files with 14 additions and 8 deletions

@ -1 +1 @@
Subproject commit 11aea4aa272ef037c189a158c4f7b2af923fdf30
Subproject commit 6f87ed87eddeea4a63827647256fd68328907fca

View File

@ -1 +1 @@
v2.0.3-1531-g3d6ec695
v2.0.3-1601-gc433e244

View File

@ -74,13 +74,13 @@ class Table():
f.seek(0)
try:
N_comment_lines,keyword = f.readline().split()
N_comment_lines,keyword = f.readline().strip().split(maxsplit=1)
if keyword != 'header':
raise TypeError
raise ValueError
else:
comments = [f.readline().strip() for i in range(1,int(N_comment_lines))]
labels = f.readline().split()
except TypeError:
except ValueError:
f.seek(0)
comments = []
line = f.readline().strip()

View File

@ -38,14 +38,21 @@ class TestTable:
def test_write_read_str(self,default,tmpdir):
default.to_ASCII(str(tmpdir.join('default.txt')))
new = Table.from_ASCII(str(tmpdir.join('default.txt')))
assert all(default.data==new.data)
assert all(default.data==new.data) and default.shapes == new.shapes
def test_write_read_file(self,default,tmpdir):
with open(tmpdir.join('default.txt'),'w') as f:
default.to_ASCII(f)
with open(tmpdir.join('default.txt')) as f:
new = Table.from_ASCII(f)
assert all(default.data==new.data)
assert all(default.data==new.data) and default.shapes == new.shapes
def test_write_read_new_style(self,default,tmpdir):
with open(tmpdir.join('new_style.txt'),'w') as f:
default.to_ASCII(f,new=True)
with open(tmpdir.join('new_style.txt')) as f:
new = Table.from_ASCII(f)
assert all(default.data==new.data) and default.shapes == new.shapes
def test_read_ang_str(self,reference_dir):
new = Table.from_ang(os.path.join(reference_dir,'simple.ang'))

View File

@ -1069,7 +1069,6 @@ end function mesh_FEasCP
!> @brief return integer list corresponding to items in consecutive lines.
!! First integer in array is counter
!> @details ints concatenated by "c" as last char, range of a "to" b, or named set
! REMARK: should replace IO_continuousIntValues
!--------------------------------------------------------------------------------------------------
function continuousIntValues(fileContent,maxN,lookupName,lookupMap,lookupMaxN)