From 9dda72d2f302d58b54788eec4312db79ee272452 Mon Sep 17 00:00:00 2001 From: Angus Hollands Date: Thu, 9 Sep 2021 19:39:12 +0100 Subject: [PATCH] Test: add test for #1084 --- tests/test_1084-from-json-win-path.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/test_1084-from-json-win-path.py diff --git a/tests/test_1084-from-json-win-path.py b/tests/test_1084-from-json-win-path.py new file mode 100644 index 0000000000..a6e327adfe --- /dev/null +++ b/tests/test_1084-from-json-win-path.py @@ -0,0 +1,19 @@ +# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE +from __future__ import absolute_import +import pytest # noqa: F401 +import numpy as np # noqa: F401 +import awkward as ak # noqa: F401 +import urllib.request +import urllib.error + + +@pytest.mark.skipif(not ak._util.win, reason="requires Windows") +def test(): + url = "https://raw.githubusercontent.com/Chicago/osd-bike-routes/master/data/Bikeroutes.geojson" + try: + bikeroutes_json = urllib.request.urlopen(url).read() + except urllib.error.URLError: + pytest.skip(reason="couldn't download sample dataset") + + # This shouldn't fail (see #1084) + ak.from_json(bikeroutes_json)