def _run_file(self, fn): try: rd = o.io.Reader(fn) o.apply(rd, o.SimpleHandler()) rd.close() finally: os.remove(fn)
def test_broken_timestamp(test_data): fn = test_data('n1 tx') try: rd = o.io.Reader(fn) with pytest.raises(RuntimeError): o.apply(rd, o.SimpleHandler()) finally: rd.close()
def test_broken_timestamp(self): fn = create_osm_file([osmobj('N', id=1, timestamp='x')]) try: rd = o.io.Reader(fn) with assert_raises(ValueError): o.apply(rd, o.SimpleHandler()) rd.close() finally: os.remove(fn)
def _run_file(fn): rd = o.io.Reader(fn) try: o.apply(rd, o.SimpleHandler()) finally: rd.close()