Run all tests in a single tests file
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
# This is just an example to get you started. You may wish to put all of your
|
||||
# tests into a single file, or separate them into multiple `test1`, `test2`
|
||||
# etc. files (better names are recommended, just make sure the name starts with
|
||||
# the letter 't').
|
||||
#
|
||||
# To run these tests, simply execute `nimble test`.
|
||||
|
||||
# To run these tests, simply execute `nimble test`.
|
||||
import unittest
|
||||
import snake_case
|
||||
|
||||
test "toSnakeCase":
|
||||
check "toSnakeCase".toSnakeCase() == "TO_SNAKE_CASE"
|
||||
check "httpServerName".toSnakeCase() == "HTTP_SERVER_NAME"
|
||||
check "portNum".toSnakeCase() == "PORT_NUM"
|
||||
check "firstNameOnly".toSnakeCase() == "FIRST_NAME_ONLY"
|
||||
check "rostr.token".toSnakeCase() == "ROSTR_TOKEN"
|
||||
|
||||
test "fromSnakeCase":
|
||||
check "TO_SNAKE_CASE".fromSnakeCase() == "toSnakeCase"
|
||||
check "HTTP_SERVER_NAME".fromSnakeCase() == "httpServerName"
|
||||
@@ -1,17 +0,0 @@
|
||||
# This is just an example to get you started. You may wish to put all of your
|
||||
# tests into a single file, or separate them into multiple `test1`, `test2`
|
||||
# etc. files (better names are recommended, just make sure the name starts with
|
||||
# the letter 't').
|
||||
#
|
||||
# To run these tests, simply execute `nimble test`.
|
||||
|
||||
import unittest
|
||||
import snake_case
|
||||
|
||||
test "toSnakeCase":
|
||||
check "toSnakeCase".toSnakeCase() == "TO_SNAKE_CASE"
|
||||
check "httpServerName".toSnakeCase() == "HTTP_SERVER_NAME"
|
||||
check "portNum".toSnakeCase() == "PORT_NUM"
|
||||
check "firstNameOnly".toSnakeCase() == "FIRST_NAME_ONLY"
|
||||
check "rostr.token".toSnakeCase() == "ROSTR_TOKEN"
|
||||
|
||||
Reference in New Issue
Block a user