Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Avoid using
match
of pytest.raises
together with paths
Fixes failures like: ``` ______________________ test_harvester_add_plot_directory ______________________ [gw1] win32 -- Python 3.7.9 d:\a\chia-blockchain\chia-blockchain\venv\scripts\python.exe tests\core\test_farmer_harvester_rpc.py:573: in test_harvester_add_plot_directory await harvester_rpc_client.add_plot_directory(str(test_path)) chia\rpc\harvester_rpc_client.py:25: in add_plot_directory return (await self.fetch("add_plot_directory", {"dirname": dirname}))["success"] chia\rpc\rpc_client.py:49: in fetch raise ValueError(res_json) E ValueError: {'error': "Path doesn't exist: C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pytest-of-runneradmin\\pytest-0\\popen-gw1\\test_harvester_add_plot_direct0\\harvester\\test_path", 'success': False} During handling of the above exception, another exception occurred: tests\core\test_farmer_harvester_rpc.py:573: in test_harvester_add_plot_directory await harvester_rpc_client.add_plot_directory(str(test_path)) C:\hostedtoolcache\windows\Python\3.7.9\x64\lib\re.py:185: in search return _compile(pattern, flags).search(string) C:\hostedtoolcache\windows\Python\3.7.9\x64\lib\re.py:288: in _compile p = sre_compile.compile(pattern, flags) C:\hostedtoolcache\windows\Python\3.7.9\x64\lib\sre_compile.py:764: in compile p = sre_parse.parse(p, flags) C:\hostedtoolcache\windows\Python\3.7.9\x64\lib\sre_parse.py:924: in parse p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0) C:\hostedtoolcache\windows\Python\3.7.9\x64\lib\sre_parse.py:420: in _parse_sub not nested and not items)) C:\hostedtoolcache\windows\Python\3.7.9\x64\lib\sre_parse.py:501: in _parse code = _escape(source, this, state) C:\hostedtoolcache\windows\Python\3.7.9\x64\lib\sre_parse.py:369: in _escape raise source.error("incomplete escape %s" % escape, len(escape)) E re.error: incomplete escape \U at position 22 ```
- Loading branch information