def test_open_txt_exception_not_str(self): file_named = ["a", "list"] with pytest.raises(Exception): result = open_text(file_named) assert result is None
def test_open_text(self): file_named = "test_1.html" result = open_text(file_named) assert "Test" in str(result)
def test_open_txt_no_file(self): file_named = "no_file_name.html" with pytest.raises(Exception): result = open_text(file_named) assert result is None
def test_open_txt_exception_slash_linux(self): file_named = "//this_is_not_right_txt" with pytest.raises(Exception): result = open_text(file_named) assert result is None