Example #1
0
 def get_all(self):
     for key, data in self.db.items():
         tile = Tile(TileCoord.from_string(key), content_type=self.content_type, data=data)
         yield tile
Example #2
0
 def list(self):
     return imap(lambda s: Tile(TileCoord.from_string(s)), iterkeys(self.db))
Example #3
0
 def test_from_string(self):
     self.assertEqual(TileCoord.from_string("1/2/3"), TileCoord(1, 2, 3))
Example #4
0
 def test_from_string_metatile(self):
     self.assertEqual(TileCoord.from_string("1/2/3:+2/+2"),
                      TileCoord(1, 2, 3, 2))
Example #5
0
 def list(self):
     return imap(lambda s: Tile(TileCoord.from_string(s)),
                 self.db.iterkeys())
Example #6
0
 def get_all(self):
     for key, data in self.db.items():
         tile = Tile(TileCoord.from_string(key),
                     content_type=self.content_type,
                     data=data)
         yield tile
Example #7
0
 def list(self) -> Iterator[Tile]:
     return map(lambda s: Tile(TileCoord.from_string(s)), self.db.keys())
Example #8
0
 def test_from_string_metatile(self):
     self.assertEqual(TileCoord.from_string('1/2/3:+2/+2'), TileCoord(1, 2, 3, 2))
Example #9
0
 def test_from_string(self):
     self.assertEqual(TileCoord.from_string('1/2/3'), TileCoord(1, 2, 3))