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.
pull/8512/head
Paolo Bonzini 4 years ago
parent a87e32d181
commit 6497e52035
  1. 2
      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)

Loading…
Cancel
Save