File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -217,6 +217,21 @@ def test_write_and_read(self):
217217 self .assertAlmostEqual (0.046164 , a3 .U [2 ,2 ])
218218 return
219219
220+ def test_eps (self ):
221+ """Test the P_cif.eps coordinates resolution.
222+ """
223+ pcif = P_cif ()
224+ pcif .eps = 1e-8
225+ grph = pcif .parseFile (self .graphiteciffile )
226+ self .assertEqual (8 , len (grph ))
227+ self .assertTrue (all (a .label .startswith ('C1' ) for a in grph [:2 ]))
228+ self .assertTrue (all (a .label .startswith ('C2' ) for a in grph [2 :]))
229+ pcif2 = P_cif ()
230+ pcif2 .eps = 1e-3
231+ grph2 = pcif2 .parseFile (self .graphiteciffile )
232+ self .assertEqual (4 , len (grph2 ))
233+ return
234+
220235 ########################################################################
221236 # helpers
222237 ########################################################################
You can’t perform that action at this time.
0 commit comments