Пример #1
0
class TestTileCacheDiskLayout(unittest.TestCase):

    def setUp(self):
        self.tilelayout = TileCacheDiskLayout()

    def test_filename(self):
        self.assertEqual('01/123/456/789/987/654/321', self.tilelayout.filename(TileCoord(1, 123456789, 987654321)))

    def test_tilecoord(self):
        self.assertEqual(TileCoord(1, 123456789, 987654321), self.tilelayout.tilecoord('01/123/456/789/987/654/321'))
Пример #2
0
class TestTileCacheDiskLayout(unittest.TestCase):
    def setUp(self):
        self.tilelayout = TileCacheDiskLayout()

    def test_filename(self):
        self.assertEqual(
            '01/123/456/789/987/654/321',
            self.tilelayout.filename(TileCoord(1, 123456789, 987654321)))

    def test_tilecoord(self):
        self.assertEqual(
            TileCoord(1, 123456789, 987654321),
            self.tilelayout.tilecoord('01/123/456/789/987/654/321'))
Пример #3
0
 def setUp(self):
     self.tilelayout = TileCacheDiskLayout()
Пример #4
0
 def setUp(self):
     self.tilelayout = TileCacheDiskLayout()
Пример #5
0
 def __init__(self, prefix='', suffix='', **kwargs):
     tilelayout = WrappedTileLayout(TileCacheDiskLayout(),
                                    prefix=prefix,
                                    suffix=suffix)
     FilesystemTileStore.__init__(self, tilelayout, **kwargs)