code: def test_match_failure_string_quoting(self):
      with pytest.raises(AssertionError) as excinfo:
          with pytest.raises(AssertionError, match="'foo"):
              raise AssertionError("'bar")
      (msg,) = excinfo.value.args
      assert (
          msg
          == '''Regex pattern did not match.\n Regex: "'foo"\n Input: "'bar"'''
      )
  
imports: import re
  import sys
  import pytest
  from _pytest.outcomes import Failed
  from _pytest.pytester import Pytester
label_desc: Use image node_id 18 for calling the TestRaises obj's underlying member method code with example usage: obj.test_match_failure_string_quoting() without return types