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)
|
old = os.environ.pop("OBSIGATE_IGNORED_DIRS", None)
|
||||||
try:
|
try:
|
||||||
import importlib
|
import importlib
|
||||||
|
import backend.indexer
|
||||||
import backend.watcher
|
import backend.watcher
|
||||||
|
importlib.reload(backend.indexer)
|
||||||
importlib.reload(backend.watcher)
|
importlib.reload(backend.watcher)
|
||||||
dirs = backend.watcher.IGNORED_DIRS
|
dirs = backend.watcher.IGNORED_DIRS
|
||||||
assert ".obsidian" in dirs
|
assert ".obsidian" in dirs
|
||||||
@@ -31,7 +33,9 @@ class TestIgnoredDirs:
|
|||||||
os.environ["OBSIGATE_IGNORED_DIRS"] = ".custom1,.custom2"
|
os.environ["OBSIGATE_IGNORED_DIRS"] = ".custom1,.custom2"
|
||||||
try:
|
try:
|
||||||
import importlib
|
import importlib
|
||||||
|
import backend.indexer
|
||||||
import backend.watcher
|
import backend.watcher
|
||||||
|
importlib.reload(backend.indexer)
|
||||||
importlib.reload(backend.watcher)
|
importlib.reload(backend.watcher)
|
||||||
dirs = backend.watcher.IGNORED_DIRS
|
dirs = backend.watcher.IGNORED_DIRS
|
||||||
assert ".custom1" in dirs
|
assert ".custom1" in dirs
|
||||||
|
|||||||
Reference in New Issue
Block a user