How to use Assert in PyTest?

 Assertions are checks that return either True or False status. In pytest, if an assertion fails in a test method, then that method execution is stopped there. The remaining code in that test method is not executed, and pytest will continue with the next test method.

Below are few examples of Asserts:

assert "hello world" == "hello"
assert 10 == 10
assert driver.title == "Login Page"
assert driver.current_url = ""