MCPcopy Index your code
hub / github.com/ipython/ipython / test_existing_path_FileLinks_repr

Function test_existing_path_FileLinks_repr

tests/test_display.py:139–151  ·  view source on GitHub ↗

FileLinks: Calling repr() functions as expected on existing directory

()

Source from the content-addressed store, hash-verified

137
138
139def test_existing_path_FileLinks_repr():
140 """FileLinks: Calling repr() functions as expected on existing directory"""
141 td = mkdtemp()
142 tf1 = NamedTemporaryFile(dir=td)
143 tf2 = NamedTemporaryFile(dir=td)
144 fl = display.FileLinks(td)
145 actual = repr(fl)
146 actual = actual.split("\n")
147 actual.sort()
148 expected = ["%s/" % td, " %s" % split(tf1.name)[1], " %s" % split(tf2.name)[1]]
149 expected.sort()
150 # We compare the sorted list of links here as that's more reliable
151 assert actual == expected
152
153
154def test_existing_path_FileLinks_repr_alt_formatter():

Callers

nothing calls this directly

Calls 1

sortMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…