def test_getPhysicalPath(self): desired_id = os.path.splitext(os.path.split(self.TEMPFILENAME)[-1])[0] desired_path = (desired_id,) f = open(self.TEMPFILENAME, 'wb') f.write(b'Boring') f.close() pt = PageTemplateFile(self.TEMPFILENAME) pt_path = pt.getPhysicalPath() self.assertEqual( pt_path, desired_path, f'getPhysicalPath() returned {desired_path!r}.' f' Expecting {pt_path!r}' )
def test_getPhysicalPath(self): desired_id = os.path.splitext(os.path.split(self.TEMPFILENAME)[-1])[0] desired_path = (desired_id,) f = open(self.TEMPFILENAME, 'wb') f.write(b'Boring') f.close() pt = PageTemplateFile(self.TEMPFILENAME) pt_path = pt.getPhysicalPath() self.assertEqual( pt_path, desired_path, 'getPhysicalPath() returned %r. Expecting %r' % ( desired_path, pt_path, ) )
def test_getPhysicalPath(self): desired_id = os.path.splitext(os.path.split(self.TEMPFILENAME)[-1])[0] desired_path = (desired_id, ) f = open(self.TEMPFILENAME, 'w') print >> f, 'Boring' f.close() pt = PageTemplateFile(self.TEMPFILENAME) pt_path = pt.getPhysicalPath() self.assertEqual( pt_path, desired_path, 'getPhysicalPath() returned %r. Expecting %r' % ( desired_path, pt_path, ))
def test_getPhysicalPath(self): desired_id = os.path.splitext(os.path.split(self.TEMPFILENAME)[-1])[0] desired_path = (desired_id,) f = open(self.TEMPFILENAME, 'w') print >> f, 'Boring' f.close() pt = PageTemplateFile(self.TEMPFILENAME) pt_path = pt.getPhysicalPath() self.failUnlessEqual( pt_path, desired_path, 'getPhysicalPath() returned %r. Expecting %r' % ( desired_path, pt_path, ) )