diff options
author | Viljami Ilola <+@hix.fi> | 2024-04-27 02:20:46 +0300 |
---|---|---|
committer | Viljami Ilola <+@hix.fi> | 2024-04-27 02:20:46 +0300 |
commit | d73fe4bb20e544443476ebb4c9fc593fa0a8ad4a (patch) | |
tree | 9a0669819d4f18cf1a118f0755d78dd95959dc7c /src/sliceitoff/settings/settings.py | |
parent | db5967a52d9409842581276154a6fa9763a57a24 (diff) |
fix tests
Diffstat (limited to 'src/sliceitoff/settings/settings.py')
-rw-r--r-- | src/sliceitoff/settings/settings.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sliceitoff/settings/settings.py b/src/sliceitoff/settings/settings.py index 19cca7d..2d4b28f 100644 --- a/src/sliceitoff/settings/settings.py +++ b/src/sliceitoff/settings/settings.py @@ -3,12 +3,14 @@ import os from pathlib import Path from .static import DEFAULT_SETTINGS +TEST_CONFIG_FILE = os.getenv("TEST_CONFIG_FILE") + class Settings: """ Handles loading and saving settings from config file""" def __init__(self, filename = None): self.settings=[] - if filename: - self.config_filename = filename + if TEST_CONFIG_FILE: + self.config_filename = Path(TEST_CONFIG_FILE) else: if os.name == 'nt': self.config_filename = (Path.home().resolve() |