[GRASS-dev] [GRASS GIS] #3737: Testsuite gunittest/multirunner.py: TypeError: str expected, not bytes
GRASS GIS
trac at osgeo.org
Sat Jan 26 12:18:50 PST 2019
#3737: Testsuite gunittest/multirunner.py: TypeError: str expected, not bytes
--------------------------+--------------------------------
Reporter: AnikaBettge | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.8.0
Component: Python | Version: svn-trunk
Resolution: | Keywords: Python3, testsuite
CPU: x86-64 | Platform: Linux
--------------------------+--------------------------------
Comment (by pmav99):
After applying the previous patches, the vast majority of the tests were
again failing due to trying to mix strings and bytes in `shutil_which()`.
The following patch fixes that and the tests can finally run. There are
still failing ones, but that's a different issue. I opted to add an
additional `decode()` call since it seems less likely to break anything.
{{{
Index: script/core.py
===================================================================
--- script/core.py (revision 74025)
+++ script/core.py (working copy)
@@ -234,7 +234,9 @@
if not normdir in seen:
seen.add(normdir)
for thefile in files:
- name = os.path.join(encode(dir), thefile)
+ name = os.path.join(encode(dir), encode(thefile))
if _access_check(name, mode):
return name
return None
}}}
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3737#comment:4>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list