How should I fail a test when an if condition becomes false
I want a test to fail when the
ifcondition below becomes
last_url = self.browser.current_url if 'https://***/news/' in last_url: print("test passed") else: #Test should fail if it reaches here print("test failed")
How can i achieve that?
You can use