mirror of
https://github.com/triqs/dft_tools
synced 2024-12-21 20:03:41 +01:00
[Tests] Remove spaces for string comparison due to different Osx Output format
This commit is contained in:
parent
d7df10d95d
commit
4dc6aa513b
@ -75,6 +75,7 @@ class TestParseInput(arraytest.ArrayTestCase):
|
||||
res += conf_pars.shells.__repr__() + '\n\n'
|
||||
res += "Groups:\n"
|
||||
res += conf_pars.groups.__repr__()
|
||||
res = res.replace(" ","") # Remove spaces for comparison
|
||||
|
||||
expected = r"""Shells:
|
||||
[{'ion_list':array([4,5,6,7]),'user_index':1,'lshell':2},{'tmatrix':array([[0.,1.,0.],
|
||||
@ -99,6 +100,7 @@ Groups:
|
||||
res += conf_pars.shells.__repr__() + '\n\n'
|
||||
res += "Groups:\n"
|
||||
res += conf_pars.groups.__repr__()
|
||||
res = res.replace(" ","") # Remove spaces for comparison
|
||||
|
||||
expected = r"""Shells:
|
||||
[{'ion_list':array([4,5,6,7]),'user_index':1,'lshell':2}]
|
||||
|
@ -45,7 +45,9 @@ class MyTestCase(unittest.TestCase):
|
||||
#
|
||||
# Remove empty lines
|
||||
lstr1 = filter(lambda s: s.strip() != '', str1.splitlines(True))
|
||||
lstr1 = [str1.replace(" ","") for str1 in lstr1] # Remove spaces
|
||||
lstr2 = filter(lambda s: s.strip() != '', str2.splitlines(True))
|
||||
lstr2 = [str2.replace(" ","") for str2 in lstr2] # Remove spaces
|
||||
# diff
|
||||
delta = difflib.unified_diff(lstr1, lstr2)
|
||||
# combine delta's to a string
|
||||
|
Loading…
Reference in New Issue
Block a user