File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33## Unreleased
44
5+ ### Fixed
6+
7+ - prevent an exception if the ` log_dir ` for the ` OhsomeClient ` was set to ` None `
8+ - removed time-dependency of unit tests that would cause them to fail at any time after the cassettes were recorded
9+
510### Changed
611
712 - relaxed dependency requirement for ` urllib3 ` to >=2.0.2 to prevent ohsome-py from becoming a 'diamond-dependency'
813 - improved and sped up testing (first steps towards [ #139 ] ( https://github.com/GIScience/ohsome-py/issues/139 ) )
914 - move metadata property from singleton to ` chached_property `
1015
11- ### Fixed
12-
13- - removed time-dependency of unit tests that would cause them to fail at any time after the cassettes were recorded
14-
1516## 0.3.0
1617
1718### Added
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ def __init__(
5656 RetryError by the underlying library.
5757 """
5858 self .log = log
59- self .log_dir = Path (log_dir )
59+ self .log_dir = Path (log_dir or DEFAULT_LOG_DIR )
6060 if self .log :
6161 self .log_dir .mkdir (parents = True , exist_ok = True )
6262 if base_api_url is not None :
Original file line number Diff line number Diff line change 1111import pytest
1212
1313import ohsome
14+ from ohsome import OhsomeClient
1415from ohsome .constants import OHSOME_VERSION
1516
1617script_path = os .path .dirname (os .path .realpath (__file__ ))
@@ -318,3 +319,15 @@ def test_post_with_endpoint_string(base_client):
318319
319320 assert isinstance (result , gpd .GeoDataFrame )
320321 assert len (result ) == 1
322+
323+
324+ def test_none_init ():
325+ """Test if the input parameters can set to None explicitly."""
326+ assert OhsomeClient (
327+ base_api_url = None ,
328+ log = None ,
329+ log_dir = None ,
330+ cache = None ,
331+ user_agent = None ,
332+ retry = None ,
333+ )
You can’t perform that action at this time.
0 commit comments