[GRASS-SVN] r74492 - grass/trunk/vector/v.what/testsuite
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu May 16 07:33:03 PDT 2019
Author: annakrat
Date: 2019-05-16 07:33:02 -0700 (Thu, 16 May 2019)
New Revision: 74492
Modified:
grass/trunk/vector/v.what/testsuite/test_vwhat_layers.py
Log:
v.what: fix test
Modified: grass/trunk/vector/v.what/testsuite/test_vwhat_layers.py
===================================================================
--- grass/trunk/vector/v.what/testsuite/test_vwhat_layers.py 2019-05-16 14:26:41 UTC (rev 74491)
+++ grass/trunk/vector/v.what/testsuite/test_vwhat_layers.py 2019-05-16 14:33:02 UTC (rev 74492)
@@ -3,7 +3,7 @@
from grass.gunittest.main import test
from grass.gunittest.gmodules import SimpleModule
-out1 = """East: 634243
+out1 = u"""East: 634243
North: 226193
------------------------------------------------------------------
Map: test_vector
@@ -24,7 +24,7 @@
"""
-out2 = """East: 634243
+out2 = u"""East: 634243
North: 226193
------------------------------------------------------------------
Map: test_vector
@@ -70,7 +70,7 @@
number : 8.09
"""
-out3 = """East=634243
+out3 = u"""East=634243
North=226193
Map=test_vector
@@ -112,7 +112,7 @@
number=8.09
"""
-out4 = """East=634243
+out4 = u"""East=634243
North=226193
Map=test_vector
@@ -139,7 +139,7 @@
number=6
"""
-out5 = """East=634243
+out5 = u"""East=634243
North=226193
Map=test_vector
@@ -178,16 +178,16 @@
def test_run(self):
self.assertModule(self.vwhat)
- self.assertLooksLike(reference=out1, actual=self.vwhat.outputs.stdout.encode('utf8'))
+ self.assertLooksLike(reference=out1, actual=self.vwhat.outputs.stdout)
def test_print_options(self):
self.vwhat.flags['a'].value = True
self.assertModule(self.vwhat)
- self.assertLooksLike(reference=out2, actual=self.vwhat.outputs.stdout.encode('utf8'))
+ self.assertLooksLike(reference=out2, actual=self.vwhat.outputs.stdout)
self.vwhat.flags['g'].value = True
self.assertModule(self.vwhat)
- self.assertLooksLike(reference=out3, actual=self.vwhat.outputs.stdout.encode('utf8'))
+ self.assertLooksLike(reference=out3, actual=self.vwhat.outputs.stdout)
def test_print_options_json(self):
import json
@@ -195,7 +195,7 @@
self.vwhat.flags['a'].value = True
self.assertModule(self.vwhat)
try:
- json.loads(self.vwhat.outputs.stdout, encoding='utf-8')
+ json.loads(self.vwhat.outputs.stdout)
except ValueError:
self.fail(msg="No JSON object could be decoded:\n" + self.vwhat.outputs.stdout)
@@ -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.encode('utf8'))
+ self.assertLooksLike(reference=out3, actual=self.vwhat.outputs.stdout)
self.vwhat.inputs.layer = 1
self.assertModule(self.vwhat)
- self.assertLooksLike(reference=out4, actual=self.vwhat.outputs.stdout.encode('utf8'))
+ self.assertLooksLike(reference=out4, actual=self.vwhat.outputs.stdout)
self.vwhat.inputs.layer = 2
self.vwhat.flags['a'].value = False
self.assertModule(self.vwhat)
- self.assertLooksLike(reference=out5, actual=self.vwhat.outputs.stdout.encode('utf8'))
+ self.assertLooksLike(reference=out5, actual=self.vwhat.outputs.stdout)
if __name__ == '__main__':
test()
More information about the grass-commit
mailing list