Skip to content

Commit

Permalink
run_unittests.sh: fix Python DeprecationWarning
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bonzini committed Jun 1, 2021
1 parent ede6692 commit 62c09a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion run_unittests.py
Original file line number Diff line number Diff line change
Expand Up @@ -6651,7 +6651,7 @@ def test_pkgconfig_gen(self):
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)
Expand Down

0 comments on commit 62c09a8

Please sign in to comment.