FileLinks: Calling repr() functions as expected on existing directory
()
| 137 | |
| 138 | |
| 139 | def 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 | |
| 154 | def test_existing_path_FileLinks_repr_alt_formatter(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…