Testing Individual Unit Tests #1039
-
I don't recall the exact verbiage, so I would like to defer to the exact terms by @jathanism and @glennmatthews, but it would be good to call out that you can run individual unit tests using the Invoke methods. With invoke, the individual test that you want to call is called with the name. In the Invoke tasks, that is the --label portion. This will help with your development environment. |
Beta Was this translation helpful? Give feedback.
Answered by
glennmatthews
Nov 23, 2021
Replies: 1 comment
-
Yes, the syntax is
A documentation PR would be more than welcome here. :-) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jvanderaa
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, the syntax is
invoke unittest --label <label>
, for exampleinvoke unittest --label nautobot.extras.tests
(all tests in thenautobot.extras.tests
module)invoke unittest --label nautobot.extras.tests.test_models.ConfigContextTest
(theConfigContextTest
class within thenautobot.extras.tests.test_models
module)invoke unittest --label nautobot.extras.tests.test_models.ConfigContextTest.test_name_uniqueness
(specific test case within that class).A documentation PR would be more than welcome here. :-)