Changes between Version 19 and Version 20 of GSoC/2014/TestingFrameworkForGRASS
- Timestamp:
- 05/26/14 10:43:27 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GSoC/2014/TestingFrameworkForGRASS
v19 v20 234 234 235 235 236 == Data types to be checked==236 == Comparing results == 237 237 238 238 We must deal especially with GRASS specific files such as raster maps. We consider that comparison of simple things such as strings and individual numbers is already implemented by [https://docs.python.org/2/library/unittest.html#test-cases unittest]. 239 240 Data types to be checked: 239 241 240 242 * raster map … … 249 251 Most of the outputs can be checked with different numerical precision. 250 252 253 We must have a simple guideline how to generate reference data. The output of G7:r.info for example is hardly comparable. It contains time stamps and user names that will differ for each test and platform. In addition the precision may be an issues between 254 platforms for metadata values (min, max, coordinates). Hence the reference output must be parseable. One solution is, in case of metadata output (G7:r.info, G7:t.info, temporal modules in general), to require the output to be in shell format so that the reference check is able compare only these parts that contain values that will not change between test platforms. Alternatively we can use [https://docs.python.org/2/library/doctest.html#doctest.OutputChecker internal functions of doctest] which are able compare texts where part of the text is [https://docs.python.org/2/library/doctest.html#doctest.ELLIPSIS ellipsis]. 255 251 256 Resources: 252 257 * http://grasswiki.osgeo.org/wiki/Test_Suite#Modules