specify accuracy in shared config
otherwise, it seems to use my config from ~/.config/my/my... instead of relying on the defaults in each module
This commit is contained in:
parent
8d503783aa
commit
6074f04fe8
2 changed files with 4 additions and 2 deletions
|
@ -90,7 +90,8 @@ def test_ip_fallback() -> None:
|
|||
from my.location.fallback.common import _iter_estimate_from
|
||||
raw_est = list(_iter_estimate_from(use_dt, (via_ip.estimate_location,)))
|
||||
assert len(raw_est) == 1
|
||||
assert raw_est[0].accuracy == 10_000
|
||||
assert raw_est[0].datasource == "via_ip"
|
||||
assert raw_est[0].accuracy == 15_000
|
||||
|
||||
# passing home should give one
|
||||
home_est = list(_iter_estimate_from(use_dt, (via_home.estimate_location,)))
|
||||
|
|
|
@ -41,6 +41,7 @@ def temp_config(temp_path: Path) -> Any:
|
|||
LTZ.config.fast = True
|
||||
|
||||
class location:
|
||||
home_accuracy = 30_000
|
||||
home = (
|
||||
# supports ISO strings
|
||||
('2005-12-04' , (42.697842, 23.325973)), # Bulgaria, Sofia
|
||||
|
@ -51,7 +52,7 @@ def temp_config(temp_path: Path) -> Any:
|
|||
)
|
||||
# note: order doesn't matter, will be sorted in the data provider
|
||||
class via_ip:
|
||||
pass
|
||||
accuracy = 15_000
|
||||
class gpslogger:
|
||||
pass
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue