MCPcopy Index your code
hub / github.com/python/cpython / test_raw_tstrings

Method test_raw_tstrings

Lib/test/test_tstring.py:143–151  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

141 self.assertEqual(fstring(t), "Value: value = 42")
142
143 def test_raw_tstrings(self):
144 path = r"C:\Users"
145 t = rt"{path}\Documents"
146 self.assertTStringEqual(t, ("", r"\Documents"), [(path, "path")])
147 self.assertEqual(fstring(t), r"C:\Users\Documents")
148
149 # Test alternative prefix
150 t = tr"{path}\Documents"
151 self.assertTStringEqual(t, ("", r"\Documents"), [(path, "path")])
152
153 def test_template_concatenation(self):
154 # Test template + template

Callers

nothing calls this directly

Calls 3

fstringFunction · 0.90
assertTStringEqualMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected