Merge remote-tracking branch 'origin/development' into fix-elem-7-57
This commit is contained in:
commit
6636f56cab
2
PRIVATE
2
PRIVATE
|
@ -1 +1 @@
|
||||||
Subproject commit 11aea4aa272ef037c189a158c4f7b2af923fdf30
|
Subproject commit 6f87ed87eddeea4a63827647256fd68328907fca
|
|
@ -74,13 +74,13 @@ class Table():
|
||||||
f.seek(0)
|
f.seek(0)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
N_comment_lines,keyword = f.readline().split()
|
N_comment_lines,keyword = f.readline().strip().split(maxsplit=1)
|
||||||
if keyword != 'header':
|
if keyword != 'header':
|
||||||
raise TypeError
|
raise ValueError
|
||||||
else:
|
else:
|
||||||
comments = [f.readline().strip() for i in range(1,int(N_comment_lines))]
|
comments = [f.readline().strip() for i in range(1,int(N_comment_lines))]
|
||||||
labels = f.readline().split()
|
labels = f.readline().split()
|
||||||
except TypeError:
|
except ValueError:
|
||||||
f.seek(0)
|
f.seek(0)
|
||||||
comments = []
|
comments = []
|
||||||
line = f.readline().strip()
|
line = f.readline().strip()
|
||||||
|
|
|
@ -38,14 +38,21 @@ class TestTable:
|
||||||
def test_write_read_str(self,default,tmpdir):
|
def test_write_read_str(self,default,tmpdir):
|
||||||
default.to_ASCII(str(tmpdir.join('default.txt')))
|
default.to_ASCII(str(tmpdir.join('default.txt')))
|
||||||
new = Table.from_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):
|
def test_write_read_file(self,default,tmpdir):
|
||||||
with open(tmpdir.join('default.txt'),'w') as f:
|
with open(tmpdir.join('default.txt'),'w') as f:
|
||||||
default.to_ASCII(f)
|
default.to_ASCII(f)
|
||||||
with open(tmpdir.join('default.txt')) as f:
|
with open(tmpdir.join('default.txt')) as f:
|
||||||
new = Table.from_ASCII(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):
|
def test_read_ang_str(self,reference_dir):
|
||||||
new = Table.from_ang(os.path.join(reference_dir,'simple.ang'))
|
new = Table.from_ang(os.path.join(reference_dir,'simple.ang'))
|
||||||
|
|
|
@ -1069,7 +1069,6 @@ end function mesh_FEasCP
|
||||||
!> @brief return integer list corresponding to items in consecutive lines.
|
!> @brief return integer list corresponding to items in consecutive lines.
|
||||||
!! First integer in array is counter
|
!! First integer in array is counter
|
||||||
!> @details ints concatenated by "c" as last char, range of a "to" b, or named set
|
!> @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)
|
function continuousIntValues(fileContent,maxN,lookupName,lookupMap,lookupMaxN)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue