From 6497e52035509a2669720b03bd166a50a834c784 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 1 Jun 2021 15:39:54 +0200 Subject: run_unittests.sh: fix Python DeprecationWarning Fix the following Python error: D:\a\1\s\run_unittests.py:6654: DeprecationWarning: invalid escape sequence \ self.assertEqual(libhello_nolib.get_pkgconfig_variable(escaped_var, {}), hello world) Use a raw string literal. --- run_unittests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'run_unittests.py') diff --git a/run_unittests.py b/run_unittests.py index 1c6d491..87091ba 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -6651,7 +6651,7 @@ class LinuxlikeTests(BasePlatformTests): self.assertEqual(libhello_nolib.get_compile_args(), []) self.assertEqual(libhello_nolib.get_pkgconfig_variable('foo', {}), 'bar') self.assertEqual(libhello_nolib.get_pkgconfig_variable('prefix', {}), self.prefix) - self.assertEqual(libhello_nolib.get_pkgconfig_variable('escaped_var', {}), 'hello\ world') + self.assertEqual(libhello_nolib.get_pkgconfig_variable('escaped_var', {}), r'hello\ world') self.assertEqual(libhello_nolib.get_pkgconfig_variable('unescaped_var', {}), 'hello world') cc = env.detect_c_compiler(MachineChoice.HOST) -- cgit v1.1