コード例 #1
0
ファイル: test_gis.py プロジェクト: shawndegroot/salem
    def test_reprs(self):
        from textwrap import dedent

        args = dict(nxny=(3, 3), dxdy=(1, 1), x0y0=(0, 0), proj=wgs84)
        g1 = Grid(**args)

        self.assertEqual(g1.__repr__(), g1.__str__())
コード例 #2
0
ファイル: test_gis.py プロジェクト: trilochan21/salem
    def test_reprs(self):
        from textwrap import dedent

        args = dict(nxny=(3, 3), dxdy=(1, 1), x0y0=(0, 0), proj=wgs84)
        g1 = Grid(**args)

        self.assertEqual(g1.__repr__(), g1.__str__())

        expected = dedent("""\
        <salem.Grid>
          proj: +datum=WGS84 +proj=latlong +units=m
          pixel_ref: center
          origin: lower-left
          (nx, ny): (3, 3)
          (dx, dy): (1.0, 1.0)
          (x0, y0): (0.0, 0.0)
        """)
        self.assertEqual(g1.__repr__(), expected)