Skip to content

Commit

Permalink
Merge branch 'v2.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
GiovanniBussi committed Mar 18, 2023
2 parents d80134c + bdf62f2 commit aadcb7e
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions python/test/test_pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,40 @@ class Test(unittest.TestCase):
def test1(self):
with cd('test/'):
d=plumed.read_as_pandas("COLVAR",enable_constants='columns')
print(d,file=open("dataframe","wt"))
with open("dataframe","wt") as f:
print(d,file=f)
self.assertTrue(filecmp.cmp("dataframe","dataframe.ref"))

def test2(self):
with cd('test/'):
d=plumed.read_as_pandas("COLVAR_gzipped.gz",enable_constants='columns')
print(d,file=open("dataframe","wt"))
with open("dataframe","wt") as f:
print(d,file=f)
self.assertTrue(filecmp.cmp("dataframe","dataframe.ref"))

def test3(self):
with cd('test/'):
i=0
for d in plumed.read_as_pandas("COLVAR",chunksize=4,enable_constants='columns'):
print(d,file=open("dataframe."+str(i),"wt"))
with open("dataframe."+str(i),"wt") as f:
print(d,file=f)
self.assertTrue(filecmp.cmp("dataframe."+str(i),"dataframe."+str(i)+".ref"))
i=i+1

def test4(self):
with cd('test/'):
i=0
for d in plumed.read_as_pandas("COLVAR_gzipped.gz",chunksize=4,enable_constants='columns'):
print(d,file=open("dataframe."+str(i),"wt"))
with open("dataframe."+str(i),"wt") as f:
print(d,file=f)
self.assertTrue(filecmp.cmp("dataframe."+str(i),"dataframe."+str(i)+".ref"))
i=i+1

def test5(self):
with cd('test/'):
d=plumed.read_as_pandas("COLVAR",enable_constants='metadata')
print(d,file=open("dataframe_noconst","wt"))
with open("dataframe_noconst","wt") as f:
print(d,file=f)
self.assertTrue(filecmp.cmp("dataframe_noconst","dataframe_noconst.ref"))
self.assertEqual(d.plumed_constants[0][0],"a")
self.assertEqual(d.plumed_constants[0][2],"pi")
Expand All @@ -54,7 +59,8 @@ def test6(self):
with cd('test/'):
i=0
for d in plumed.read_as_pandas("COLVAR",chunksize=4,enable_constants='metadata'):
print(d,file=open("dataframe_noconst."+str(i),"wt"))
with open("dataframe_noconst."+str(i),"wt") as f:
print(d,file=f)
self.assertTrue(filecmp.cmp("dataframe_noconst."+str(i),"dataframe_noconst."+str(i)+".ref"))
self.assertEqual(d.plumed_constants[0][0],"a")
self.assertEqual(d.plumed_constants[0][2],"pi")
Expand Down

1 comment on commit aadcb7e

@PlumedBot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found broken examples in automatic/a-masterclass-22-09.txt
Found broken examples in automatic/a-masterclass-22-11.txt
Found broken examples in automatic/a-masterclass-22-12.txt
Found broken examples in automatic/performance-optimization.txt
Found broken examples in automatic/a-trieste-6.txt
Found broken examples in automatic/munster.txt
Found broken examples in automatic/ANN.tmp
Found broken examples in automatic/EDS.tmp
Found broken examples in automatic/EMMI.tmp
Found broken examples in automatic/ENVIRONMENTSIMILARITY.tmp
Found broken examples in automatic/FOURIER_TRANSFORM.tmp
Found broken examples in automatic/FUNCPATHGENERAL.tmp
Found broken examples in automatic/FUNCPATHMSD.tmp
Found broken examples in automatic/FUNNEL.tmp
Found broken examples in automatic/FUNNEL_PS.tmp
Found broken examples in automatic/GHBFIX.tmp
Found broken examples in automatic/INCLUDE.tmp
Found broken examples in automatic/MAZE_MEMETIC_SAMPLING.tmp
Found broken examples in automatic/MAZE_OPTIMIZER_BIAS.tmp
Found broken examples in automatic/MAZE_RANDOM_ACCELERATION_MD.tmp
Found broken examples in automatic/MAZE_RANDOM_WALK.tmp
Found broken examples in automatic/MAZE_SIMULATED_ANNEALING.tmp
Found broken examples in automatic/MAZE_STEERED_MD.tmp
Found broken examples in automatic/PIV.tmp
Found broken examples in automatic/PLUMED.tmp
Found broken examples in MiscelaneousPP.md

Please sign in to comment.