|
11 | 11 | from os.path import join as _pJoin |
12 | 12 | from .getLib import _getLib |
13 | 13 | import sys |
14 | | - |
| 14 | +from typing import Optional |
15 | 15 |
|
16 | 16 | # Imported for type information |
17 | 17 | from robot.libraries.BuiltIn import BuiltIn |
@@ -91,13 +91,24 @@ def _copyPythonLibs(pythonImports, libsDest): |
91 | 91 | opSys.copy_file(libSource, libsDest) |
92 | 92 |
|
93 | 93 |
|
94 | | -def setupProfile(repoRoot: str, settingsFileName: str, stagingDir: str): |
| 94 | +def setupProfile( |
| 95 | + repoRoot: str, |
| 96 | + settingsFileName: str, |
| 97 | + stagingDir: str, |
| 98 | + gesturesFileName: Optional[str] = None, |
| 99 | +): |
95 | 100 | builtIn.log("Copying files into NVDA profile", level='DEBUG') |
96 | 101 | opSys.copy_file( |
97 | 102 | # Despite duplication, specify full paths for clarity. |
98 | 103 | _pJoin(repoRoot, "tests", "system", "nvdaSettingsFiles", settingsFileName), |
99 | 104 | _pJoin(stagingDir, "nvdaProfile", "nvda.ini") |
100 | 105 | ) |
| 106 | + if gesturesFileName is not None: |
| 107 | + opSys.copy_file( |
| 108 | + # Despite duplication, specify full paths for clarity. |
| 109 | + _pJoin(repoRoot, "tests", "system", "nvdaSettingsFiles", gesturesFileName), |
| 110 | + _pJoin(stagingDir, "nvdaProfile", "gestures.ini") |
| 111 | + ) |
101 | 112 | # create a package to use as the globalPlugin |
102 | 113 | _installSystemTestSpyToScratchPad( |
103 | 114 | repoRoot, |
|
0 commit comments