From 13e9437eb9ae3e7de32cc4af62d83bb6e9312871 Mon Sep 17 00:00:00 2001 From: EstrellaXD Date: Mon, 6 Mar 2023 14:19:41 +0800 Subject: [PATCH] Fix pytests --- .github/workflows/unittest.yml | 1 + module/conf/config.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 0246cf4d..94a59282 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -27,6 +27,7 @@ jobs: python -m pip install --upgrade pip if [ -f requirements.txt ]; then pip install -r requirements.txt; fi pip install pytest + mkdir config - name: Test run: pytest test/test_raw_parser.py \ No newline at end of file diff --git a/module/conf/config.py b/module/conf/config.py index 93b762bb..71cda65f 100644 --- a/module/conf/config.py +++ b/module/conf/config.py @@ -60,9 +60,9 @@ class Settings: try: from .version import VERSION if os.path.isdir("config"): - CONFIG_PATH = ("config/config.json") + CONFIG_PATH = "config/config.json" else: - CONFIG_PATH = DEFAULT_SETTINGS + CONFIG_PATH = None except ImportError: VERSION = "DEV_VERSION" CONFIG_PATH = "config/config_dev.json"