fix: reload backend.indexer before watcher in IGNORED_DIRS tests
This commit is contained in:
@@ -17,7 +17,9 @@ class TestIgnoredDirs:
|
||||
old = os.environ.pop("OBSIGATE_IGNORED_DIRS", None)
|
||||
try:
|
||||
import importlib
|
||||
import backend.indexer
|
||||
import backend.watcher
|
||||
importlib.reload(backend.indexer)
|
||||
importlib.reload(backend.watcher)
|
||||
dirs = backend.watcher.IGNORED_DIRS
|
||||
assert ".obsidian" in dirs
|
||||
@@ -31,7 +33,9 @@ class TestIgnoredDirs:
|
||||
os.environ["OBSIGATE_IGNORED_DIRS"] = ".custom1,.custom2"
|
||||
try:
|
||||
import importlib
|
||||
import backend.indexer
|
||||
import backend.watcher
|
||||
importlib.reload(backend.indexer)
|
||||
importlib.reload(backend.watcher)
|
||||
dirs = backend.watcher.IGNORED_DIRS
|
||||
assert ".custom1" in dirs
|
||||
|
||||
Reference in New Issue
Block a user