Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Create new unit tests for Evennia #1458
Brief summary of issue / Description of requested feature:
This is an issue originally started under hacktoberfest but extended beyond that. The issue is for expanding Evennia's unit test coverage. This is also a great way to learn some of Evennia's systems under the hood.
Steps to reproduce the issue / Reasons for adding feature:
Expected result of feature
We are currently at 53% unit test coverage, why not expand that?
Extra information, such as Evennia revision/repo/branch, operating system and ideas for how to solve / implement:
@Keda87 It's not necessary to run
# linux coverage run --source=../evennia --omit=*/migrations/*,*/urls.py,*/test*.py,*.sh,*.txt,*.md,*.pyc,*.service ../evennia/bin/unix/evennia test evennia # windows (untested) coverage run --source=../evennia --omit=*/migrations/*,*/urls.py,*/test*.py,*.sh,*.txt,*.md,*.pyc,*.service ../evennia/bin/windows/evennia test evennia
@Griatch Hi, I read some documentation and have started with some testing on syscommands.py, but I am not able to follow how the args passed on to cmdobj in each test are used. Could you direct me to the particular docs that may make me understand how the strings passed in the tests as args are handled by CommandTest?
Spare me for a noobish question but am new to gitHub :p
@gulasnani As you can see in TestCommand, the
Normally (when a real command is run in Evennia), these are the arguments passed to the command. So if the command was
Now, in the case of the test, the execution of the command is emulated, with the body of the command being executed when first the
In the specific case of the
Hope that helps!