diff --git a/examples/2_2_reading_data_osm.ipynb b/examples/2_2_reading_data_osm.ipynb index b3966c5a..3e1adae0 100644 --- a/examples/2_2_reading_data_osm.ipynb +++ b/examples/2_2_reading_data_osm.ipynb @@ -130,6 +130,7 @@ "outputs": [], "source": [ "import importlib_resources\n", + "\n", "from genet import read_osm" ] }, diff --git a/examples/4_2_using_network_road_pricing.ipynb b/examples/4_2_using_network_road_pricing.ipynb index 6cd08c47..c7f55edf 100644 --- a/examples/4_2_using_network_road_pricing.ipynb +++ b/examples/4_2_using_network_road_pricing.ipynb @@ -61,6 +61,7 @@ "from pathlib import Path\n", "\n", "import pandas as pd\n", + "\n", "from genet import read_matsim\n", "\n", "path_to_matsim_network = \"example_data/pt2matsim_network\"\n", diff --git a/examples/5_3_modifying_network_simplification.ipynb b/examples/5_3_modifying_network_simplification.ipynb index 490c5575..766c650f 100644 --- a/examples/5_3_modifying_network_simplification.ipynb +++ b/examples/5_3_modifying_network_simplification.ipynb @@ -56,6 +56,7 @@ ], "source": [ "import importlib_resources\n", + "\n", "from genet import read_osm\n", "\n", "n = read_osm(\n", diff --git a/examples/5_4_modifying_network_addition.ipynb b/examples/5_4_modifying_network_addition.ipynb index b8f3188d..f93b8f4d 100644 --- a/examples/5_4_modifying_network_addition.ipynb +++ b/examples/5_4_modifying_network_addition.ipynb @@ -66,6 +66,7 @@ ], "source": [ "import importlib_resources\n", + "\n", "from genet import read_osm\n", "\n", "_n_tiny = read_osm(\n", diff --git a/examples/6_2_validating_network_google_directions_api.ipynb b/examples/6_2_validating_network_google_directions_api.ipynb index 4042e0d2..c222ef67 100644 --- a/examples/6_2_validating_network_google_directions_api.ipynb +++ b/examples/6_2_validating_network_google_directions_api.ipynb @@ -30,12 +30,13 @@ "import os\n", "import random\n", "\n", - "import genet\n", "import matplotlib.pyplot as plt\n", + "from shapely.geometry import LineString\n", + "\n", + "import genet\n", "from genet import google_directions, read_matsim\n", "from genet.output.spatial import generate_geodataframes\n", - "from genet.utils.io import save_geodataframe\n", - "from shapely.geometry import LineString" + "from genet.utils.io import save_geodataframe" ] }, { diff --git a/tests/test_java_dtypes.py b/tests/test_java_dtypes.py index 64984e01..077935e3 100644 --- a/tests/test_java_dtypes.py +++ b/tests/test_java_dtypes.py @@ -3,43 +3,43 @@ def test_mapping_java_array_to_python_type(): - assert java_to_python_dtype("java.lang.Array") == list + assert isinstance(java_to_python_dtype("java.lang.Array"), list) def test_mapping_java_bool_to_python_type(): - assert java_to_python_dtype("java.lang.Boolean") == bool + assert isinstance(java_to_python_dtype("java.lang.Boolean"), bool) def test_mapping_java_double_to_python_type(): - assert java_to_python_dtype("java.lang.Double") == float + assert isinstance(java_to_python_dtype("java.lang.Double"), float) def test_mapping_java_long_to_python_type(): - assert java_to_python_dtype("java.lang.Long") == float + assert isinstance(java_to_python_dtype("java.lang.Long"), float) def test_mapping_java_float_to_python_type(): - assert java_to_python_dtype("java.lang.Float") == float + assert isinstance(java_to_python_dtype("java.lang.Float"), float) def test_mapping_java_integer_to_python_type(): - assert java_to_python_dtype("java.lang.Integer") == int + assert isinstance(java_to_python_dtype("java.lang.Integer"), int) def test_mapping_java_byte_to_python_type(): - assert java_to_python_dtype("java.lang.Byte") == int + assert isinstance(java_to_python_dtype("java.lang.Byte"), int) def test_mapping_java_short_to_python_type(): - assert java_to_python_dtype("java.lang.Short") == int + assert isinstance(java_to_python_dtype("java.lang.Short"), int) def test_mapping_java_char_to_python_type(): - assert java_to_python_dtype("java.lang.Char") == str + assert isinstance(java_to_python_dtype("java.lang.Char"), str) def test_mapping_java_string_to_python_type(): - assert java_to_python_dtype("java.lang.String") == str + assert isinstance(java_to_python_dtype("java.lang.String"), str) def test_unknown_java_type_raises_exception():