From the course: Using Rust with Python

Unlock this course with a free trial

Join today to access over 23,200 courses taught by industry experts.

Embedded Rust CLI test

Embedded Rust CLI test - Rust Tutorial

From the course: Using Rust with Python

Embedded Rust CLI test

- [Instructor] Here we have a diagram of what I would consider a best practice for building out embedded Python tools with Rust is that not only do we have the command lane interface here, but we need to ensure that the business logic will have continuity in the face of changes or you know, other developers working on the projects, et cetera. You can't just assume that the business logic will work, even if it compiles the tool works, there could be an issue. So we need to validate the input by writing a unit test. So let's go ahead and take a look at how we would do that. So first up here you can see again the code, but we're going to get into a GitHub code space here and look through the logic. So we see here that this is a CLI tool that wraps Py03 embedded Python code and it takes input. Now what is the input that it's actually going to take and what's it actually going to do? Well if we go through here, we can see that it's going to expect Marco, but in this case it's going to…

Contents