Browse Source

make test_v_rast_stats.py pass with Python 2 and 3

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@74419 15284696-431f-4ddb-bdfa-cd5b030d7da7
Stefan Blumentrath 6 years ago
parent
commit
b8ac3a0707
1 changed files with 3 additions and 3 deletions
  1. 3 3
      scripts/v.rast.stats/testsuite/test_v_rast_stats.py

+ 3 - 3
scripts/v.rast.stats/testsuite/test_v_rast_stats.py

@@ -61,7 +61,7 @@ class TestRastStats(TestCase):
         v_db_select = SimpleModule("v.db.select", map="zone_map")
 
         self.runModule(v_db_select)
-        self.assertLooksLike(univar_string, v_db_select.outputs.stdout.encode('utf-8'))
+        self.assertLooksLike(univar_string, str(v_db_select.outputs.stdout))
 
 
     def test_line_d(self):
@@ -75,7 +75,7 @@ class TestRastStats(TestCase):
         v_db_select = SimpleModule("v.db.select", map="test_line")
         
         self.runModule(v_db_select)
-        self.assertLooksLike(output_str, v_db_select.outputs.stdout.encode('utf-8'))
+        self.assertLooksLike(output_str, str(v_db_select.outputs.stdout))
 
 
     def test_line(self):
@@ -90,7 +90,7 @@ class TestRastStats(TestCase):
         v_db_select = SimpleModule("v.db.select", map="test_line")
         
         self.runModule(v_db_select)
-        self.assertLooksLike(output_str, v_db_select.outputs.stdout.encode('utf-8'))
+        self.assertLooksLike(output_str, str(v_db_select.outputs.stdout))
 
 
 class TestRastStatsFails(TestCase):