Skip to content

CodePadawans/nano_padawans_test

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

nano_padawans_test

Our second project by RGSoC is to develop a tool for documentation testing. Therefore, we want to learn first about testing and the already existing tools. A challenge for us here is to write a mini test framework, to understand what happens behind the scenes of an actual TF.

Elza - a monster that eats meat

We created a class Monster and a method eat. Therefore a MonsterTest class has a method eat_test. There is also a superclass Test, that MonsterTest inherits from.

class Test methods

run calls all methods ending on _test

assert takes 3 arguments (expected, actual, msg = ""), it raises an exception, if expected is not actual and returns a victory message otherwise

self.inherited(subclass) collects all inherited classes

def self.run_all_tests runs all of test of all inherited classes

At the end, you need to call Test.run_all_tests and BOOM!! all the test for all the classes run at a very high speed.

Elza ate meat.

About

This is our challenge to write a mini test framework, in preparation for the second project, to understand what happens behind the scenes of a test framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages