<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 17 Apr 2022 at 07:30, Adithya Ambapurkar <<a href="mailto:adinayyu@gmail.com" target="_blank">adinayyu@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">...used %%python...</div></blockquote><div><br></div><div>As I mentioned earlier, I don't recommend this approach, but yes, you can (and have to) use this in the notebook. However, that's for the notebook only. Unrelated to the actual test code.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"> It ran all tests successfully but in output it says raster map not found.</div></blockquote><div><br></div><div>This may or may not be a problem. If the tests pass, chances are it is the correct and expected output. For example, if the test checks the behavior when a non-existent raster map is used, the message is expected and inside the test, it likely expects failure rather than success with, e.g., the assertModuleFail function you have seen.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">...How to convert it to pytest code as both are different and is there any documentation which compares gunittest and pytest. Pytest docs and gunittest docs are separate. Example for assertModule and assertModuleFail what is its equivalent in pytest.</div></blockquote><div><br></div><div>This is all for the actual summer project including the documentation.</div><div><br></div><div>All pytest is experimental now and does not have any documentation. However, general pytest documentation applies:</div><div><br></div><div><a href="https://docs.pytest.org/">https://docs.pytest.org/</a></div></div></div>