Exemplo n.º 1
0
    def but_it_raises_error_when_it_doesnt_exist(self):
        slide = Slide("a/b", "processed")

        with pytest.raises(FileNotFoundError) as err:
            slide.show()

        assert (str(err.value) ==
                "Cannot display the slide thumbnail:[Errno 2] No such file or "
                "directory: 'processed/thumbnails/b.png'")
Exemplo n.º 2
0
    def but_it_raises_error_when_it_doesnt_exist(self):
        slide = Slide("a/b", "processed")

        with pytest.raises(FileNotFoundError) as err:
            slide.show()

        assert (
            str(err.value) ==
            "Cannot display the slide thumbnail: The wsi path resource doesn't "
            "exist: a/b")
Exemplo n.º 3
0
    def but_it_raises_error_when_it_doesnt_exist(self):
        slide = Slide("a/b", "processed")

        with pytest.raises(FileNotFoundError) as err:
            slide.show()

        assert (
            str(err.value) ==
            "Cannot display the slide thumbnail:[Errno 2] No such file or "
            f"directory: {repr(os.path.join('processed', 'thumbnails', 'b.png'))}"
        )