11"""Tests for the 'docbuild repo clone' command."""
22
33import logging
4+ import re
45from unittest .mock import AsyncMock
56
67import pytest
@@ -112,15 +113,16 @@ async def test_process_stitchnode_none(monkeypatch, tmp_path):
112113 (tmp_path / "config" ).mkdir ()
113114 (tmp_path / "repos" ).mkdir ()
114115
115- with pytest .raises (ValueError , match = "Stitch node could not be created." ):
116+ with pytest .raises (ValueError ,
117+ match = re .escape ("Stitch node could not be created." )):
116118 await mod_process .process (context , repos = ())
117119
118120
119121async def test_process_configdir_none ():
120122 context = DocBuildContext (envconfig = {"paths" : {}})
121123 with pytest .raises (
122124 ValueError ,
123- match = "Could not get a value from envconfig.paths.config_dir" ,
125+ match = re . escape ( "Could not get a value from envconfig.paths.config_dir" ) ,
124126 ):
125127 await mod_process .process (context , repos = ())
126128
@@ -129,6 +131,6 @@ async def test_process_repodir_none():
129131 context = DocBuildContext (envconfig = {"paths" : {"config_dir" : "/dummy/config" }})
130132 with pytest .raises (
131133 ValueError ,
132- match = "Could not get a value from envconfig.paths.repo_dir" ,
134+ match = re . escape ( "Could not get a value from envconfig.paths.repo_dir" ) ,
133135 ):
134136 await mod_process .process (context , repos = ())
0 commit comments