I have been adding new unit tests for some (not all) new functions/methods 
in the big PR.


Some of these tests are more complicated than usual. For example, tests of 
*g.findAnyUnl* require that the *@data unl-path-prefixes* setting refers to 
actual files.


The details are a bit messy, so I defined two new helpers:


- *TestGlobals._patch_at_data_unl_path_prefixes* and

- *LeoUnitTest._set_setting.*


The first calls the second. These helpers are themselves a new pattern for 
me.


The second new pattern defines unit tests for the helpers: 


- *LeoUnitTest.test_set_setting* and

- *TestGlobals.test_patch_at_data_unl_path_prefixes*.


*Summary*


g.findAnyUnl assumes that @data unl-path-prefixes is functional. Setting up 
this condition is more complicated than usual.


One new helper helps simulate the @data unl-path-prefixes setting.


The other new helper helps the helper :-)


New unit tests test both helpers.


Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/b0f56678-af91-4ac6-87b3-a0a3643f4dd7n%40googlegroups.com.

Reply via email to