Example #1
0
 def _run_file(self, fn):
     try:
         rd = o.io.Reader(fn)
         o.apply(rd, o.SimpleHandler())
         rd.close()
     finally:
         os.remove(fn)
Example #2
0
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()
Example #3
0
 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)
Example #4
0
def _run_file(fn):
    rd = o.io.Reader(fn)
    try:
        o.apply(rd, o.SimpleHandler())
    finally:
        rd.close()