'Test we can pop arbitrary elements from the pathspec.'

def testPop(self):

    sample = rdf_paths.PathSpec(path='/', pathtype=rdf_paths.PathSpec.PathType.OS)
    for i in range(5):
        sample.Append(path=str(i), pathtype=rdf_paths.PathSpec.PathType.OS)
    self.assertEqual([x.path for x in sample], list('/01234'))
    popped = sample.Pop(2)
    self.assertIsInstance(popped, rdf_paths.PathSpec)
    self.assertEqual(popped.path, '1')
    self.assertEqual([x.path for x in sample], list('/0234'))
    self.assertEqual(sample.Pop(0).path, '/')
    self.assertEqual([x.path for x in sample], list('0234'))
