forked from dictation-toolbox/unimacro
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
79 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#pylint:disable=E1101 | ||
from pathlib import Path | ||
import pytest | ||
import natlink | ||
from natlinkcore import natlinkstatus | ||
status = natlinkstatus.NatlinkStatus | ||
|
||
thisDir = Path(__file__).parent | ||
|
||
def mock_unimacro_user_dir(tmp_dir, _self): | ||
|
||
mock_folder= tmp_dir / "mock_unimacro_userdir" | ||
print(f"Mock unimacro folder {mock_folder} in {__file__}") #just for understanding remove eventually | ||
if not mock_folder.is_dir(): | ||
mock_folder.mkdir() | ||
return str(mock_folder) | ||
|
||
def test_fill_folders_list(): | ||
"""see if (with debugging) the list folders (foldersDict) is filled | ||
""" | ||
# monkeypatch.setattr(status, "getUnimacroUserDirectory", mock_unimacro_user_dir) | ||
|
||
natlink.natConnect() | ||
try: | ||
from unimacro.UnimacroGrammars._folders import ThisGrammar | ||
thisGrammar = ThisGrammar() | ||
thisGrammar.startInifile() #modName = '_folders') | ||
thisGrammar.initialize() | ||
finally: | ||
natlink.natDisconnect() | ||
|
||
if __name__ == "__main__": | ||
pytest.main(['test_grammar_folders.py']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters