last lint
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from scripts.utils.parse_settings import config_to_settings
|
||||
import tempfile
|
||||
|
||||
|
||||
def test():
|
||||
text = """LATITUDE=32.0
|
||||
LONGITUDE=-73.0
|
||||
@@ -32,7 +33,7 @@ DATABASE_LANG=en
|
||||
LAST_RUN=
|
||||
THIS_RUN=
|
||||
IDFILE=/home/pi/BirdNET-Pi/IdentifiedSoFar.txt"""
|
||||
|
||||
|
||||
filename = tempfile.NamedTemporaryFile(suffix='.txt', delete=False)
|
||||
with open(filename.name, 'w', encoding='utf8', newline='') as f:
|
||||
f.write(text)
|
||||
@@ -40,5 +41,4 @@ IDFILE=/home/pi/BirdNET-Pi/IdentifiedSoFar.txt"""
|
||||
settings = config_to_settings(filename.name)
|
||||
assert(settings["APPRISE_NOTIFICATION_TITLE"] == "Bird!")
|
||||
assert(settings["FULL_DISK"] == "purge")
|
||||
assert(settings["OVERLAP"] == "0.0") # Yes, it's a string at this point.
|
||||
|
||||
assert(settings["OVERLAP"] == "0.0") # Yes, it's a string at this point.
|
||||
|
||||
Reference in New Issue
Block a user