[GRASS-SVN] r74277 - grass/trunk/vector/v.what/testsuite

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Mar 15 15:18:34 PDT 2019


Author: sbl
Date: 2019-03-15 15:18:34 -0700 (Fri, 15 Mar 2019)
New Revision: 74277

Modified:
   grass/trunk/vector/v.what/testsuite/test_vwhat_layers.py
   grass/trunk/vector/v.what/testsuite/test_vwhat_ncspm.py
Log:
partly fix v.what test

Modified: grass/trunk/vector/v.what/testsuite/test_vwhat_layers.py
===================================================================
--- grass/trunk/vector/v.what/testsuite/test_vwhat_layers.py	2019-03-15 22:01:48 UTC (rev 74276)
+++ grass/trunk/vector/v.what/testsuite/test_vwhat_layers.py	2019-03-15 22:18:34 UTC (rev 74277)
@@ -178,16 +178,16 @@
 
     def test_run(self):
         self.assertModule(self.vwhat)
-        self.assertLooksLike(reference=out1, actual=self.vwhat.outputs.stdout)
+        self.assertLooksLike(reference=out1, actual=self.vwhat.outputs.stdout.encode('utf8'))
 
     def test_print_options(self):
         self.vwhat.flags['a'].value = True
         self.assertModule(self.vwhat)
-        self.assertLooksLike(reference=out2, actual=self.vwhat.outputs.stdout)
+        self.assertLooksLike(reference=out2, actual=self.vwhat.outputs.stdout.encode('utf8'))
 
         self.vwhat.flags['g'].value = True
         self.assertModule(self.vwhat)
-        self.assertLooksLike(reference=out3, actual=self.vwhat.outputs.stdout)
+        self.assertLooksLike(reference=out3, actual=self.vwhat.outputs.stdout.encode('utf8'))
 
     def test_print_options_json(self):
         import json
@@ -204,16 +204,16 @@
         self.vwhat.flags['g'].value = True
         self.vwhat.flags['a'].value = True
         self.assertModule(self.vwhat)
-        self.assertLooksLike(reference=out3, actual=self.vwhat.outputs.stdout)
+        self.assertLooksLike(reference=out3, actual=self.vwhat.outputs.stdout.encode('utf8'))
 
         self.vwhat.inputs.layer = 1
         self.assertModule(self.vwhat)
-        self.assertLooksLike(reference=out4, actual=self.vwhat.outputs.stdout)
+        self.assertLooksLike(reference=out4, actual=self.vwhat.outputs.stdout.encode('utf8'))
 
         self.vwhat.inputs.layer = 2
         self.vwhat.flags['a'].value = False
         self.assertModule(self.vwhat)
-        self.assertLooksLike(reference=out5, actual=self.vwhat.outputs.stdout)
+        self.assertLooksLike(reference=out5, actual=self.vwhat.outputs.stdout.encode('utf8'))
 
 if __name__ == '__main__':
     test()

Modified: grass/trunk/vector/v.what/testsuite/test_vwhat_ncspm.py
===================================================================
--- grass/trunk/vector/v.what/testsuite/test_vwhat_ncspm.py	2019-03-15 22:01:48 UTC (rev 74276)
+++ grass/trunk/vector/v.what/testsuite/test_vwhat_ncspm.py	2019-03-15 22:18:34 UTC (rev 74277)
@@ -182,21 +182,21 @@
 
     def test_multiple_maps(self):
         self.assertModule(self.vwhat)
-        self.assertMultiLineEqual(first=out1, second=self.vwhat.outputs.stdout)
+        self.assertMultiLineEqual(first=out1, second=self.vwhat.outputs.stdout.encode('utf8'))
 
     def test_print_options(self):
         self.vwhat.flags['a'].value = True
         self.assertModule(self.vwhat)
-        self.assertLooksLike(reference=out2, actual=self.vwhat.outputs.stdout)
+        self.assertLooksLike(reference=out2, actual=self.vwhat.outputs.stdout.encode('utf8'))
 
         self.vwhat.flags['g'].value = True
         self.assertModule(self.vwhat)
-        self.assertLooksLike(reference=out3, actual=self.vwhat.outputs.stdout)
+        self.assertLooksLike(reference=out3, actual=self.vwhat.outputs.stdout.encode('utf8'))
 
     def test_threshold(self):
         self.vwhat.inputs['distance'].value = 100
         self.assertModule(self.vwhat)
-        self.assertLooksLike(reference=out4, actual=self.vwhat.outputs.stdout)
+        self.assertLooksLike(reference=out4, actual=self.vwhat.outputs.stdout.encode('utf8'))
 
     def test_print_options_json(self):
         import json



More information about the grass-commit mailing list