]> Nutra Git (v1) - nutratech/cli.git/commitdiff
usda init: pragma: no cover
authorShane Jaroch <chown_tee@proton.me>
Sun, 25 Feb 2024 21:13:15 +0000 (16:13 -0500)
committerShane Jaroch <chown_tee@proton.me>
Sun, 25 Feb 2024 21:13:15 +0000 (16:13 -0500)
ntclient/persistence/sql/usda/__init__.py

index de3eec32594e820acc8c1938ac463dcb759cb220..e36e976992610e483cbc1d5ba0aaa742c83e4a21 100644 (file)
@@ -21,7 +21,7 @@ def usda_init(yes: bool = False) -> None:
         """Download USDA tarball from BitBucket and extract to storage folder"""
 
         # TODO: move this into separate module, ignore coverage. Avoid SLOW tests
-        if yes or input_agree().lower() == "y":
+        if yes or input_agree().lower() == "y":  # pragma: no cover
             # TODO: save with version in filename?
             #  Don't re-download tarball, just extract?
             save_path = os.path.join(NUTRA_HOME, "%s.tar.xz" % USDA_DB_NAME)
@@ -45,10 +45,10 @@ def usda_init(yes: bool = False) -> None:
         "/download/{1}/{0}-{1}.tar.xz".format(USDA_DB_NAME, __db_target_usda__)
     )
 
-    if USDA_DB_NAME not in os.listdir(NUTRA_HOME):
+    if USDA_DB_NAME not in os.listdir(NUTRA_HOME):  # pragma: no cover
         print("INFO: usda.sqlite3 doesn't exist, is this a fresh install?")
         download_extract_usda()
-    elif usda_ver() != __db_target_usda__:
+    elif usda_ver() != __db_target_usda__:  # pragma: no cover
         print(
             "INFO: usda.sqlite3 target [{0}] doesn't match actual [{1}], ".format(
                 __db_target_usda__, usda_ver()