From the course: GitHub Copilot for System-Level Development

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Challenge: TDD for a new feature

Challenge: TDD for a new feature

- [Instructor] There are a couple of things I want to implement for this function, the string to Boolean function that is taking a string and providing us either a true or a false. And in the worst case scenario, if it's absolutely miserable with what's coming in, it will return or raise, rather, a value error. Okay, so in this case, there's a couple things I want to do. First is that I want to allow not only a one, but I also want to allow a zero. And then the other aspect of this is that I want to allow for spaces, like say for example, if yes is sent like this, well, I want to support that and make sure that that works, as well. So what are we going to do? Well, we're going to create a prompt and that prompt is going to help us out implement all of the failing test cases to implement that missing zero. So in this case, we already have the one, so we would have to implement the zero. So I'm going to write that prompt.…

Contents