diff --git a/general/g.mapsets/tests/g_mapsets_list_format_test.py b/general/g.mapsets/tests/g_mapsets_list_format_test.py index 5e6fffbbc27..3e7ab80f096 100644 --- a/general/g.mapsets/tests/g_mapsets_list_format_test.py +++ b/general/g.mapsets/tests/g_mapsets_list_format_test.py @@ -14,10 +14,8 @@ """Test parsing and structure of outputs from g.mapsets""" import json -import sys import pytest import grass.script as gs -from grass.script import utils as gutils SEPARATORS = ["newline", "space", "comma", "tab", "pipe", ","] @@ -31,10 +29,6 @@ def _check_parsed_list(mapsets, text, sep="|"): assert text == sep.join(mapsets) + "\n" -@pytest.mark.xfail( - sys.platform == "win32", - reason="universal_newlines or text subprocess option not used", -) @pytest.mark.parametrize("separator", SEPARATORS) def test_plain_list_output(simple_dataset, separator): """Test that the separators are properly applied with list flag""" @@ -46,13 +40,9 @@ def test_plain_list_output(simple_dataset, separator): flags="l", env=simple_dataset.session.env, ) - _check_parsed_list(mapsets, text, gutils.separator(separator)) + _check_parsed_list(mapsets, text, gs.separator(separator)) -@pytest.mark.xfail( - sys.platform == "win32", - reason="universal_newlines or text subprocess option not used", -) @pytest.mark.parametrize("separator", SEPARATORS) def test_plain_print_output(simple_dataset, separator): """Test that the separators are properly applied with print flag""" @@ -64,7 +54,7 @@ def test_plain_print_output(simple_dataset, separator): flags="p", env=simple_dataset.session.env, ) - _check_parsed_list(mapsets, text, gutils.separator(separator)) + _check_parsed_list(mapsets, text, gs.separator(separator)) def test_json_list_output(simple_dataset): diff --git a/python/grass/gunittest/gmodules.py b/python/grass/gunittest/gmodules.py index c691900e8a8..f38e77b0762 100644 --- a/python/grass/gunittest/gmodules.py +++ b/python/grass/gunittest/gmodules.py @@ -11,7 +11,7 @@ import subprocess from grass.script.core import start_command -from grass.script.utils import encode, decode +from grass.script.utils import decode from grass.exceptions import CalledModuleError from grass.pygrass.modules import Module @@ -134,7 +134,7 @@ def call_module( # for no stdout, output is None which is out interface # for stderr=STDOUT or no stderr, errors is None # which is fine for CalledModuleError - output, errors = process.communicate(input=encode(decode(stdin)) if stdin else None) + output, errors = process.communicate(input=decode(stdin) if stdin else None) returncode = process.poll() if returncode: raise CalledModuleError(module, kwargs, returncode, errors) diff --git a/python/grass/jupyter/utils.py b/python/grass/jupyter/utils.py index b855d1e8e1f..e5c39bf3d7b 100644 --- a/python/grass/jupyter/utils.py +++ b/python/grass/jupyter/utils.py @@ -72,15 +72,12 @@ def reproject_region(region, from_proj, to_proj): stdout=gs.PIPE, stderr=gs.PIPE, ) - proc.stdin.write(gs.encode(proj_input)) - proc.stdin.close() - proc.stdin = None - proj_output, stderr = proc.communicate() + proj_output, stderr = proc.communicate(proj_input) if proc.returncode: raise RuntimeError( _("Encountered error while running m.proj: {}").format(stderr) ) - output = gs.decode(proj_output).splitlines() + output = proj_output.splitlines() # get the largest bbox latitude_list = [] longitude_list = [] diff --git a/python/grass/pygrass/modules/interface/module.py b/python/grass/pygrass/modules/interface/module.py index 452661fa222..e8d53071914 100644 --- a/python/grass/pygrass/modules/interface/module.py +++ b/python/grass/pygrass/modules/interface/module.py @@ -4,7 +4,7 @@ from grass.exceptions import CalledModuleError, GrassError, ParameterError from grass.script.core import Popen, PIPE, use_temp_region, del_temp_region -from grass.script.utils import encode, decode +from grass.script.utils import decode from .docstring import docstring_property from .parameter import Parameter from .flag import Flag @@ -853,8 +853,6 @@ def wait(self): :return: A reference to this object """ if self._finished is False: - if self.stdin: - self.stdin = encode(self.stdin) stdout, stderr = self._popen.communicate(input=self.stdin) self.outputs["stdout"].value = decode(stdout) if stdout else "" self.outputs["stderr"].value = decode(stderr) if stderr else "" diff --git a/python/grass/script/core.py b/python/grass/script/core.py index 40436b07e35..7a90611dffb 100644 --- a/python/grass/script/core.py +++ b/python/grass/script/core.py @@ -37,7 +37,7 @@ from pathlib import Path from typing import TYPE_CHECKING, TypeVar -from .utils import KeyValue, parse_key_val, basename, encode, decode, try_remove +from .utils import KeyValue, parse_key_val, basename, decode, try_remove from grass.exceptions import ScriptError, CalledModuleError from grass.grassdb.manage import resolve_mapset_path @@ -54,6 +54,40 @@ class Popen(subprocess.Popen): _builtin_exts = {".com", ".exe", ".bat", ".cmd"} + class StdinWrapper: + """ + Decodes bytes into str if writing failed and text mode was automatically set. + + Remove for version 9 + """ + + def __init__(self, stdin, implied_text): + self._stdin = stdin + self._implied_text = implied_text + + def write(self, data): + try: + self._stdin.write(data) + except TypeError: + if self._implied_text: + self._stdin.write(decode(data)) + else: + raise + + def flush(self): + if self._stdin: + self._stdin.flush() + + def close(self): + if self._stdin: + self._stdin.close() + + def __getattr__(self, name): + # Forward everything else to the original stdin + if self._stdin: + return getattr(self._stdin, name) + return None + @staticmethod def _escape_for_shell(arg): # TODO: what are cmd.exe's parsing rules? @@ -66,6 +100,13 @@ def __init__(self, args, **kwargs): if cmd is None: raise OSError(_("Cannot find the executable {0}").format(args[0])) args = [cmd] + args[1:] + + # Use text mode by default + self._implied_text = False + if "text" not in kwargs and "universal_newlines" not in kwargs: + kwargs["text"] = True + self._implied_text = True + if ( sys.platform == "win32" and isinstance(args, list) @@ -85,6 +126,14 @@ def __init__(self, args, **kwargs): subprocess.Popen.__init__(self, args, **kwargs) + @property + def stdin(self): + return self._wrapped_stdin + + @stdin.setter + def stdin(self, value): + self._wrapped_stdin = Popen.StdinWrapper(value, self._implied_text) + PIPE = subprocess.PIPE STDOUT = subprocess.STDOUT @@ -736,10 +785,6 @@ def write_command(*args, **kwargs): encoding = kwargs["encoding"] # TODO: should we delete it from kwargs? stdin = kwargs["stdin"] - if encoding is None or encoding == "default": - stdin = encode(stdin) - else: - stdin = encode(stdin, encoding=encoding) if _capture_stderr and "stderr" not in kwargs.keys(): kwargs["stderr"] = PIPE process = feed_command(*args, **kwargs) @@ -2040,7 +2085,7 @@ def local_env(): stdin=PIPE, env=local_env(), ) - stdin = encode(wkt) + stdin = wkt else: _create_location_xy(mapset_path.directory, mapset_path.location) diff --git a/python/grass/script/raster.py b/python/grass/script/raster.py index bfe5e822563..2095f02de91 100644 --- a/python/grass/script/raster.py +++ b/python/grass/script/raster.py @@ -39,7 +39,6 @@ ) from grass.exceptions import CalledModuleError from .utils import ( - encode, float_or_dms, parse_key_val, try_remove, @@ -215,7 +214,7 @@ def mapcalc_start( verbose=verbose, overwrite=overwrite, ) - p.stdin.write(encode(e)) + p.stdin.write(e) p.stdin.close() return p diff --git a/python/grass/script/task.py b/python/grass/script/task.py index 78e48000a9b..5483a858fbd 100644 --- a/python/grass/script/task.py +++ b/python/grass/script/task.py @@ -414,13 +414,19 @@ def get_task(self): def convert_xml_to_utf8(xml_text): # enc = locale.getdefaultlocale()[1] - + if xml_text is None: + return None # modify: fetch encoding from the interface description text(xml) # e.g. pattern = re.compile(rb'<\?xml[^>]*\Wencoding="([^"]*)"[^>]*\?>') m = re.match(pattern, xml_text) if m is None: - return xml_text.encode("utf-8") if xml_text else None + try: + xml_text.decode("utf-8", errors="strict") + return xml_text + except UnicodeDecodeError: + return decode(xml_text).encode("utf-8") + enc = m.groups()[0] # modify: change the encoding to "utf-8", for correct parsing @@ -441,7 +447,9 @@ def get_interface_description(cmd): When unable to fetch the interface description for a command. """ try: - p = Popen([cmd, "--interface-description"], stdout=PIPE, stderr=PIPE) + p = Popen( + [cmd, "--interface-description"], stdout=PIPE, stderr=PIPE, text=False + ) cmdout, cmderr = p.communicate() # TODO: do it better (?) @@ -458,6 +466,7 @@ def get_interface_description(cmd): [sys.executable, get_real_command(cmd), "--interface-description"], stdout=PIPE, stderr=PIPE, + text=False, ) cmdout, cmderr = p.communicate() diff --git a/python/grass/script/testsuite/test_start_command_functions.py b/python/grass/script/testsuite/test_start_command_functions.py index 368669263a8..25375e51e7b 100644 --- a/python/grass/script/testsuite/test_start_command_functions.py +++ b/python/grass/script/testsuite/test_start_command_functions.py @@ -6,8 +6,7 @@ from grass.gunittest.main import test from grass.gunittest.utils import xfail_windows -from grass.script.core import start_command, PIPE, run_command, write_command -from grass.script.core import read_command, find_program +from grass.script import start_command, PIPE, run_command, write_command, read_command from grass.script.utils import encode @@ -17,12 +16,12 @@ class TestPythonKeywordsInParameters(TestCase): It works the same for keywords, buildins and any names. """ - raster = b"does_not_exist" + raster = "does_not_exist" def test_prefixed_underscore(self): proc = start_command("g.region", _raster=self.raster, stderr=PIPE) stderr = proc.communicate()[1] - self.assertNotIn(b"_raster", stderr) + self.assertNotIn("_raster", stderr) self.assertIn( self.raster, stderr, msg="Raster map name should appear in the error output" ) @@ -30,7 +29,7 @@ def test_prefixed_underscore(self): def test_suffixed_underscore(self): proc = start_command("g.region", raster_=self.raster, stderr=PIPE) stderr = proc.communicate()[1] - self.assertNotIn(b"raster_", stderr) + self.assertNotIn("raster_", stderr) self.assertIn( self.raster, stderr, msg="Raster map name should appear in the error output" ) @@ -40,7 +39,7 @@ def test_multiple_underscores(self): stderr = proc.communicate()[1] returncode = proc.poll() self.assertEqual(returncode, 1) - self.assertIn(b"raster", stderr) + self.assertIn("raster", stderr) class TestPythonModuleWithUnicodeParameters(TestCase): @@ -86,10 +85,8 @@ def setUpClass(cls): def tearDownClass(cls): cls.runModule("g.remove", type="raster", name=cls.raster, flags="f") - @xfail_windows - def test_write_labels_unicode(self): - """This tests if Python module works""" - find_program("ls", "--version") + def test_write_read_labels_str(self): + """This tests if standard string works""" write_command( "r.category", map=self.raster, @@ -102,21 +99,18 @@ def test_write_labels_unicode(self): self.assertIsInstance(res, str) @xfail_windows - def test_write_labels_bytes(self): - """This tests if Python module works""" + def test_write_bytes_read_str(self): + """This test backwards compatibility when writing bytes""" write_command( "r.category", map=self.raster, rules="-", - stdin="1:kůň\n2:kráva\n3:ovečka\n4:býk", + stdin=encode("1:kůň\n2:kráva\n3:ovečka\n4:býk"), separator=":", - encoding=None, ) - res = read_command( - "r.category", map=self.raster, separator=":", encoding=None - ).strip() - self.assertEqual(res, encode("1:kůň\n2:kráva\n3:ovečka\n4:býk")) - self.assertIsInstance(res, bytes) + res = read_command("r.category", map=self.raster, separator=":").strip() + self.assertEqual(res, "1:kůň\n2:kráva\n3:ovečka\n4:býk") + self.assertIsInstance(res, str) if __name__ == "__main__": diff --git a/python/grass/script/testsuite/test_start_command_functions_nc.py b/python/grass/script/testsuite/test_start_command_functions_nc.py index 4ad5d46f6e5..50dd2bf2a41 100644 --- a/python/grass/script/testsuite/test_start_command_functions_nc.py +++ b/python/grass/script/testsuite/test_start_command_functions_nc.py @@ -29,7 +29,7 @@ def test_prefixed_underscore(self): stderr = proc.communicate()[1] returncode = proc.poll() self.assertEqual(returncode, 0, msg="Underscore as prefix was not accepted") - self.assertNotIn(b"_raster", stderr) + self.assertNotIn("_raster", stderr) def test_suffixed_underscore(self): proc = start_command("g.region", raster_=self.raster, stderr=PIPE) @@ -40,14 +40,14 @@ def test_suffixed_underscore(self): 0, msg="Underscore as suffix was not accepted, stderr is:\n%s" % stderr, ) - self.assertNotIn(b"raster_", stderr) + self.assertNotIn("raster_", stderr) def test_multiple_underscores(self): proc = start_command("g.region", _raster_=self.raster, stderr=PIPE) stderr = proc.communicate()[1] returncode = proc.poll() self.assertEqual(returncode, 1, msg="Underscore at both sides was accepted") - self.assertIn(b"raster", stderr) + self.assertIn("raster", stderr) class TestParseCommand(TestCase): diff --git a/python/grass/semantic_label/reader.py b/python/grass/semantic_label/reader.py index 358e7fafdf9..d6538e5c940 100644 --- a/python/grass/semantic_label/reader.py +++ b/python/grass/semantic_label/reader.py @@ -1,5 +1,4 @@ import os -import sys import json import glob import re @@ -86,10 +85,8 @@ def print_kv(k, v, indent): print_kv(k, v, indent) def _print_label(self, semantic_label=None, tag=None): - sys.stdout.write(semantic_label) - if tag: - sys.stdout.write(" {}".format(tag)) - sys.stdout.write(os.linesep) + tag_text = f" {tag}" if tag else "" + print(f"{semantic_label}{tag_text}") def print_info(self, shortcut=None, band=None, semantic_label=None, extended=False): """Prints semantic label information to stdout. diff --git a/scripts/i.band.library/testsuite/test_i_band_library.py b/scripts/i.band.library/testsuite/test_i_band_library.py index 7d55ecff9ff..3fed99e166f 100644 --- a/scripts/i.band.library/testsuite/test_i_band_library.py +++ b/scripts/i.band.library/testsuite/test_i_band_library.py @@ -1,5 +1,3 @@ -import os - from grass.gunittest.case import TestCase from grass.gunittest.main import test from grass.gunittest.gmodules import call_module @@ -9,7 +7,7 @@ class TestBandsSystemDefined(TestCase): @staticmethod def _number_of_bands(**kwargs): gbands = call_module("i.band.library", **kwargs) - return len(gbands.rstrip(os.linesep).split(os.linesep)) + return len(gbands.splitlines()) def test_number_system_defined(self): """Test number of valid band identifiers""" diff --git a/scripts/m.proj/m.proj.py b/scripts/m.proj/m.proj.py index c42bee8c6a3..006ecb6ec2d 100755 --- a/scripts/m.proj/m.proj.py +++ b/scripts/m.proj/m.proj.py @@ -245,7 +245,7 @@ def main(): cmd = ["cs2cs"] + copyinp + outfmt + in_proj.split() + ["+to"] + out_proj.split() - p = gcore.Popen(cmd, stdin=gcore.PIPE, stdout=gcore.PIPE) + p = gcore.Popen(cmd, stdin=gcore.PIPE, stdout=gcore.PIPE, text=False) tr = TrThread(ifs, inf, p.stdin) tr.start() diff --git a/scripts/r.mask/r.mask.py b/scripts/r.mask/r.mask.py index b30fd94965c..29fb1ff988b 100755 --- a/scripts/r.mask/r.mask.py +++ b/scripts/r.mask/r.mask.py @@ -73,7 +73,6 @@ import atexit import grass.script as gs -from grass.script.utils import encode from grass.exceptions import CalledModuleError @@ -165,7 +164,7 @@ def main(): "r.reclass", input=raster, output=name, overwrite=True, rules="-" ) res = "%s = 1" % maskcats - p.stdin.write(encode(res)) + p.stdin.write(res) p.stdin.close() p.wait() elif vector: diff --git a/scripts/v.rast.stats/testsuite/test_v_rast_stats.py b/scripts/v.rast.stats/testsuite/test_v_rast_stats.py index 01ae6d4a7d2..8124c951578 100644 --- a/scripts/v.rast.stats/testsuite/test_v_rast_stats.py +++ b/scripts/v.rast.stats/testsuite/test_v_rast_stats.py @@ -5,7 +5,6 @@ from grass.gunittest.case import TestCase from grass.gunittest.gmodules import SimpleModule -from grass.gunittest.utils import xfail_windows from grass.pygrass.vector import VectorTopo from grass.pygrass.vector.geometry import Line from grass.pygrass.vector.geometry import Boundary @@ -73,7 +72,6 @@ def setUp(self): vt.table.conn.commit() vt.close() - @xfail_windows def test_1(self): # Output of v.rast.stats univar_string = """cat|value|label|a_minimum|a_maximum|a_sum @@ -94,7 +92,6 @@ def test_1(self): self.runModule(v_db_select) self.assertLooksLike(univar_string, str(v_db_select.outputs.stdout)) - @xfail_windows def test_line_d(self): output_str = """cat|name|a_median|a_number|a_range 1|first|192|3|1 @@ -113,7 +110,6 @@ def test_line_d(self): self.runModule(v_db_select) self.assertLooksLike(output_str, str(v_db_select.outputs.stdout)) - @xfail_windows def test_line(self): output_str = """cat|name|a_median|a_number|a_range 1|first|192|5|2 @@ -133,7 +129,6 @@ def test_line(self): self.runModule(v_db_select) self.assertLooksLike(output_str, str(v_db_select.outputs.stdout)) - @xfail_windows def test_zone_all(self): # Output of v.rast.stats univar_string = """cat|value|label|a_number|a_null_cells|a_minimum|a_maximum|a_range|a_average|a_stddev|a_variance|a_coeff_var|a_sum|a_first_quartile|a_median|a_third_quartile|a_percentile_90 @@ -149,7 +144,6 @@ def test_zone_all(self): self.runModule(v_db_select) self.assertLooksLike(univar_string, str(v_db_select.outputs.stdout)) - @xfail_windows def test_small_area_with_centroid(self): # Output of v.rast.stats univar_string = """cat|name|a_number|a_null_cells|a_minimum|a_maximum|a_range|a_average|a_stddev|a_variance|a_coeff_var|a_sum|a_first_quartile|a_median|a_third_quartile|a_percentile_90 diff --git a/temporal/t.rast.gapfill/testsuite/test_gapfill.py b/temporal/t.rast.gapfill/testsuite/test_gapfill.py index bfc8f48f581..0e82948e0f3 100644 --- a/temporal/t.rast.gapfill/testsuite/test_gapfill.py +++ b/temporal/t.rast.gapfill/testsuite/test_gapfill.py @@ -10,7 +10,6 @@ from grass.gunittest.case import TestCase from grass.gunittest.gmodules import SimpleModule -from grass.gunittest.utils import xfail_windows class TestRasterToVector(TestCase): @@ -74,7 +73,6 @@ def tearDown(self): """Remove generated data""" self.runModule("t.remove", flags="df", type="strds", inputs="A") - @xfail_windows def test_simple_2procs(self): self.assertModule( "t.rast.gapfill", @@ -125,7 +123,6 @@ def test_simple_2procs(self): self.assertModule(rast_list) self.assertLooksLike(text, rast_list.outputs.stdout) - @xfail_windows def test_simple_where(self): self.assertModule( "t.rast.gapfill", @@ -174,7 +171,6 @@ def test_simple_where(self): self.assertModule(rast_list) self.assertLooksLike(text, rast_list.outputs.stdout) - @xfail_windows def test_simple_where_2(self): self.assertModule( "t.rast.gapfill", @@ -218,7 +214,6 @@ def test_simple_where_2(self): self.assertModule(rast_list) self.assertLooksLike(text, rast_list.outputs.stdout) - @xfail_windows def test_simple_empty(self): self.assertModule( "t.rast.gapfill", @@ -305,7 +300,6 @@ def test_simple_gran(self): self.assertModule(rast_list) self.assertLooksLike(text, rast_list.outputs.stdout) - @xfail_windows def test_simple_gran(self): self.assertModule( "t.rast.gapfill", diff --git a/temporal/t.rast.univar/testsuite/test_t_rast_univar.py b/temporal/t.rast.univar/testsuite/test_t_rast_univar.py index 7bdfe9f7f6a..2d136a437fe 100644 --- a/temporal/t.rast.univar/testsuite/test_t_rast_univar.py +++ b/temporal/t.rast.univar/testsuite/test_t_rast_univar.py @@ -12,7 +12,6 @@ from grass.gunittest.case import TestCase from grass.gunittest.gmodules import SimpleModule -from grass.gunittest.utils import xfail_windows class TestRasterUnivar(TestCase): @@ -153,7 +152,6 @@ def tearDownClass(cls): cls.del_temp_region() - @xfail_windows def test_with_all_maps(self): t_rast_univar = SimpleModule( "t.rast.univar", @@ -179,7 +177,6 @@ def test_with_all_maps(self): res_line = res.split("|", 1)[1] self.assertLooksLike(ref_line, res_line) - @xfail_windows def test_with_subset_of_maps(self): t_rast_univar = SimpleModule( "t.rast.univar", @@ -204,7 +201,6 @@ def test_with_subset_of_maps(self): res_line = res.split("|", 1)[1] self.assertLooksLike(ref_line, res_line) - @xfail_windows def test_coarser_resolution(self): t_rast_univar = SimpleModule( "t.rast.univar", @@ -320,7 +316,6 @@ def test_error_handling_no_input(self): # No input self.assertModuleFail("t.rast.univar", output="out.txt") - @xfail_windows def test_with_zones(self): """Test use of zones""" @@ -358,7 +353,6 @@ def test_with_zones(self): res_line = res.split("|", 1)[1] self.assertLooksLike(ref_line, res_line) - @xfail_windows def test_with_zones_and_r(self): """Test use of zones and r-flag""" @@ -397,7 +391,6 @@ def test_with_zones_and_r(self): res_line = res.split("|", 1)[1] self.assertLooksLike(ref_line, res_line) - @xfail_windows def test_with_semantic_label(self): """Test semantic labels""" t_rast_univar = SimpleModule( @@ -424,7 +417,6 @@ def test_with_semantic_label(self): res_line = res.split("|", 1)[1] self.assertLooksLike(ref_line, res_line) - @xfail_windows def test_with_semantic_label_parallel(self): """Test semantic labels""" t_rast_univar = SimpleModule( @@ -452,7 +444,6 @@ def test_with_semantic_label_parallel(self): res_line = res.split("|", 1)[1] self.assertLooksLike(ref_line, res_line) - @xfail_windows def test_with_spatial_filter_intersects(self): """Test spatial filter overlaps""" t_rast_univar = SimpleModule( @@ -481,7 +472,6 @@ def test_with_spatial_filter_intersects(self): res_line = res.split("|", 1)[1] self.assertLooksLike(ref_line, res_line) - @xfail_windows def test_with_spatial_filter_contains(self): """Test spatial filter contains""" t_rast_univar = SimpleModule( @@ -508,7 +498,6 @@ def test_with_spatial_filter_contains(self): res_line = res.split("|", 1)[1] self.assertLooksLike(ref_line, res_line) - @xfail_windows def test_with_spatial_filter_is_contained(self): """Test spatial filter is_contained""" t_rast_univar = SimpleModule( diff --git a/temporal/t.rast.what/testsuite/test_what.py b/temporal/t.rast.what/testsuite/test_what.py index 18c7af63807..96432eff4e1 100644 --- a/temporal/t.rast.what/testsuite/test_what.py +++ b/temporal/t.rast.what/testsuite/test_what.py @@ -10,7 +10,6 @@ from grass.gunittest.case import TestCase from grass.gunittest.gmodules import SimpleModule -from grass.gunittest.utils import xfail_windows class TestRasterWhat(TestCase): @@ -219,7 +218,6 @@ def test_timerow_output_coords(self): "out_timerow_coords.txt", "ca4ee0e7e4aaca170d6034e0d57d292d", text=True ) - @xfail_windows def test_row_stdout_where_parallel(self): t_rast_what = SimpleModule( "t.rast.what", @@ -247,7 +245,6 @@ def test_row_stdout_where_parallel(self): """ self.assertLooksLike(text, str(t_rast_what.outputs.stdout)) - @xfail_windows def test_row_stdout_where_parallel_cat(self): t_rast_what = SimpleModule( "t.rast.what", @@ -275,7 +272,6 @@ def test_row_stdout_where_parallel_cat(self): """ self.assertLooksLike(text, str(t_rast_what.outputs.stdout)) - @xfail_windows def test_row_stdout_where_parallel2(self): """Here without output definition, the default is used then""" @@ -389,7 +385,6 @@ def tearDownClass(cls): cls.runModule("t.remove", flags="df", type="strds", inputs="A") cls.del_temp_region() - @xfail_windows def test_null_value(self): """Test setting the null value""" diff --git a/temporal/t.rast3d.univar/testsuite/test_t_rast3d_univar.py b/temporal/t.rast3d.univar/testsuite/test_t_rast3d_univar.py index 21980921168..40e7e87d2c2 100644 --- a/temporal/t.rast3d.univar/testsuite/test_t_rast3d_univar.py +++ b/temporal/t.rast3d.univar/testsuite/test_t_rast3d_univar.py @@ -12,7 +12,6 @@ from grass.gunittest.case import TestCase from grass.gunittest.gmodules import SimpleModule -from grass.gunittest.utils import xfail_windows class TestRasterUnivar(TestCase): @@ -60,7 +59,6 @@ def tearDownClass(cls): cls.runModule("g.remove", flags="f", type="raster_3d", name="zones") cls.del_temp_region() - @xfail_windows def test_with_all_maps(self): t_rast3d_univar = SimpleModule( "t.rast3d.univar", @@ -85,7 +83,6 @@ def test_with_all_maps(self): res_line = res.split("|", 1)[1] self.assertLooksLike(ref_line, res_line) - @xfail_windows def test_with_subset_of_maps(self): t_rast3d_univar = SimpleModule( "t.rast3d.univar", @@ -170,7 +167,6 @@ def test_error_handling_no_input(self): # No input self.assertModuleFail("t.rast3d.univar", output="out.txt") - @xfail_windows def test_with_zones(self): """Test use of zones""" @@ -208,7 +204,6 @@ def test_with_zones(self): res_line = res.split("|", 1)[1] self.assertLooksLike(ref_line, res_line) - @xfail_windows def test_with_zones_parallel(self): """Test use of zones"""