FileLink: Calling _repr_html_ functions as expected on existing filepath
()
| 54 | nt.assert_true(fl._repr_html_().startswith('Path (<tt>example.txt</tt>)')) |
| 55 | |
| 56 | def test_existing_path_FileLink(): |
| 57 | """FileLink: Calling _repr_html_ functions as expected on existing filepath |
| 58 | """ |
| 59 | tf = NamedTemporaryFile() |
| 60 | fl = display.FileLink(tf.name) |
| 61 | actual = fl._repr_html_() |
| 62 | expected = "<a href='%s' target='_blank'>%s</a><br>" % (tf.name,tf.name) |
| 63 | nt.assert_equal(actual,expected) |
| 64 | |
| 65 | def test_existing_path_FileLink_repr(): |
| 66 | """FileLink: Calling repr() functions as expected on existing filepath |
nothing calls this directly
no test coverage detected