Re: Proposal/research: compatibility mode for add-ons
Hi Alberto:toggle quoted messageShow quoted text
This PR contains the mentioned unit tests. The relationship with your
proposal may not be obvious, but an add-on or other kind of helpeer
maybe used to search common sentences used to import code in all
modules contained in a folder.
For example, some kind of json file maybe included in NVDA or in
anadd-on with deprecations or removed modules, and this maybe used by
third party application. I use just git grep for now, and the changes
In my PR for the cursorLocator add-on, unittests are used to import
the utils module contained in the add-on, and MagicMock class is used
to simulate the config module, since the add-on itself doesn't contain
it but it's used by utils, so, if MagicMoc is not used, tests fail.
Then, some tests cases are designed, for example, providing
config.conf["cursorLocator"]["maxStartNotificationNumber"+ is 1. Then,
the utils.shouldReportStartOfLine(text) function will return True and
this is evaluated.
Just an example. See the tests folder on this PR for more info:
2022-05-08 15:05 GMT+02:00, Alberto Buffolino <a.buffolino@...>:
Noelia Ruiz, il 8/5/2022, ha scritto:Now I'm workingAlberto: