diff --git a/python/grass/jupyter/tests/grass_jupyter_session_test.py b/python/grass/jupyter/tests/grass_jupyter_session_test.py index fd725303844..17b6e7fbf5d 100644 --- a/python/grass/jupyter/tests/grass_jupyter_session_test.py +++ b/python/grass/jupyter/tests/grass_jupyter_session_test.py @@ -4,8 +4,6 @@ import os import sys -import pytest - # All init tests change the global environment, but we use a separate process # only when it is necessary. @@ -22,10 +20,6 @@ def run_in_subprocess(file): return process.stdout -@pytest.mark.xfail( - sys.platform == "win32", - reason="tmp_path string in interpolated code should be escaped or use raw strings", -) def test_init_finish(tmp_path): """Check that init function works with an explicit session finish""" location = "test" @@ -33,8 +27,8 @@ def test_init_finish(tmp_path): import os import grass.script as gs import grass.jupyter as gj -gs.core._create_location_xy("{tmp_path}", "{location}") -session = gj.init("{tmp_path / location}") +gs.core._create_location_xy(r"{tmp_path}", r"{location}") +session = gj.init(r"{tmp_path / location}") gs.read_command("g.region", flags="p") print(os.environ["GISRC"]) session.finish() @@ -48,10 +42,6 @@ def test_init_finish(tmp_path): assert not os.path.exists(session_file), f"Session file {session_file} not deleted" -@pytest.mark.xfail( - sys.platform == "win32", - reason="tmp_path string in interpolated code should be escaped or use raw strings", -) def test_init_with_auto_finish(tmp_path): """Check that init function works with an implicit session finish""" location = "test" @@ -59,8 +49,8 @@ def test_init_with_auto_finish(tmp_path): import os import grass.script as gs import grass.jupyter as gj -gs.core._create_location_xy("{tmp_path}", "{location}") -session = gj.init("{tmp_path / location}") +gs.core._create_location_xy(r"{tmp_path}", r"{location}") +session = gj.init(r"{tmp_path / location}") print(os.environ["GISRC"]) """