[GRASS-SVN] r65796 - grass/trunk/lib/python/script/testsuite
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jul 29 07:19:50 PDT 2015
Author: zarch
Date: 2015-07-29 07:19:50 -0700 (Wed, 29 Jul 2015)
New Revision: 65796
Modified:
grass/trunk/lib/python/script/testsuite/test_start_command_functions.py
grass/trunk/lib/python/script/testsuite/test_start_command_functions_nc.py
Log:
script:testsuite update tests
Modified: grass/trunk/lib/python/script/testsuite/test_start_command_functions.py
===================================================================
--- grass/trunk/lib/python/script/testsuite/test_start_command_functions.py 2015-07-29 14:18:55 UTC (rev 65795)
+++ grass/trunk/lib/python/script/testsuite/test_start_command_functions.py 2015-07-29 14:19:50 UTC (rev 65796)
@@ -12,13 +12,13 @@
It works the same for keywords, buildins and any names.
"""
- raster = 'does_not_exist'
+ raster = b'does_not_exist'
def test_prefixed_underscore(self):
proc = start_command(
'g.region', _raster=self.raster, stderr=PIPE)
stderr = proc.communicate()[1]
- self.assertNotIn('_raster', stderr)
+ self.assertNotIn(b'_raster', stderr)
self.assertIn(self.raster, stderr,
msg="Raster map name should appear in the error output")
@@ -26,7 +26,7 @@
proc = start_command(
'g.region', raster_=self.raster, stderr=PIPE)
stderr = proc.communicate()[1]
- self.assertNotIn('raster_', stderr)
+ self.assertNotIn(b'raster_', stderr)
self.assertIn(self.raster, stderr,
msg="Raster map name should appear in the error output")
@@ -36,7 +36,7 @@
stderr = proc.communicate()[1]
returncode = proc.poll()
self.assertEquals(returncode, 1)
- self.assertIn('raster', stderr)
+ self.assertIn(b'raster', stderr)
if __name__ == '__main__':
test()
Modified: grass/trunk/lib/python/script/testsuite/test_start_command_functions_nc.py
===================================================================
--- grass/trunk/lib/python/script/testsuite/test_start_command_functions_nc.py 2015-07-29 14:18:55 UTC (rev 65795)
+++ grass/trunk/lib/python/script/testsuite/test_start_command_functions_nc.py 2015-07-29 14:19:50 UTC (rev 65796)
@@ -19,7 +19,7 @@
# fresh region for each test function
def setUp(self):
self.use_temp_region()
-
+
def tearDown(self):
self.del_temp_region()
@@ -30,7 +30,7 @@
returncode = proc.poll()
self.assertEquals(returncode, 0,
msg="Underscore as prefix was not accepted")
- self.assertNotIn('_raster', stderr)
+ self.assertNotIn(b'_raster', stderr)
def test_suffixed_underscore(self):
proc = start_command(
@@ -39,7 +39,7 @@
returncode = proc.poll()
self.assertEquals(returncode, 0,
msg="Underscore as suffix was not accepted, stderr is:\n%s" % stderr)
- self.assertNotIn('raster_', stderr)
+ self.assertNotIn(b'raster_', stderr)
def test_multiple_underscores(self):
proc = start_command(
@@ -48,7 +48,7 @@
returncode = proc.poll()
self.assertEquals(returncode, 1,
msg="Underscore at both sides was accepted")
- self.assertIn('raster', stderr)
+ self.assertIn(b'raster', stderr)
if __name__ == '__main__':
test()
More information about the grass-commit
mailing list