From the course: Debug Your Code with AI
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Simple fixing with testing
From the course: Debug Your Code with AI
Simple fixing with testing
- [Instructor] When we're debugging things, when we're debugging errors and issues, sometimes things might not be an actual issue. So we've seen already, in this particular case with the virtual environment, now I'm running a different test here. This one is test_reports_import_error. So this is actually the test, and we can say we're running a test for an entire file, and the file has an import error, and we have certain expectations. So the expectation is this one. If you're not familiar with Python or Pytest and how this works, that's fine. You have to be somewhat familiar into understanding that tests have, like, an assertion, which means, hey, make sure that this thing is in the other thing Like, certain things are met. So in this case it tells you, "Hey, line one should be in the result." The result is gathering the output from the execution of the command. And here we have this one, which is kind of like, what is actually failing? So here we see import error should be in the…