~awuerl/blitzortung-python/master

« back to all changes in this revision

Viewing changes to tests/test_geom.py

  • Committer: Andreas Wuerl
  • Date: 2019-06-24 19:32:25 UTC
  • mto: This revision was merged to the branch mainline in revision 394.
  • Revision ID: git-v1:29d4be282c05035bdff8d4828573537ed6d8ceea
update tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
"""
20
20
 
 
21
import datetime
21
22
from unittest import TestCase
22
 
import datetime
23
23
 
24
24
import pyproj
25
25
import shapely.geometry
140
140
        assert_that(self.grid.get_y_center(3)).is_equal_to(1.375)
141
141
 
142
142
    def test_repr(self):
143
 
        assert_that(repr(self.grid)).is_equal_to("Grid(x: -5.0000..4.0000 (0.5000, #18), y: -3.0000..2.0000 (1.2500, #4))")
 
143
        assert_that(repr(self.grid)).is_equal_to(
 
144
            "Grid(x: -5.0000..4.0000 (0.5000, #18), y: -3.0000..2.0000 (1.2500, #4))")
144
145
 
145
146
 
146
147
class TestGridFactory(TestCase):
182
183
        assert_that(grid_1).is_same_as(grid_2)
183
184
 
184
185
 
185
 
 
186
 
 
187
 
 
188
186
class TestRasterElement(TestCase):
189
187
    def setUp(self):
190
188
        self.timestamp = datetime.datetime(2013, 9, 6, 21, 36, 0, 123456)
203
201
        assert_that(self.raster_element > other_raster_element)
204
202
 
205
203
    def test_string_representation(self):
206
 
        assert_that(repr(self.raster_element)).is_equal_to("GridElement(1234, 2013-09-06 21:36:00.123456)")
 
 
b'\\ No newline at end of file'
 
204
        assert_that(repr(self.raster_element)).is_equal_to("GridElement(1234, 2013-09-06 21:36:00.123456)")