def test_should_return_female_when_the_name_is_from_female_gender():
markets.py
, the test should be test_markets.py
def test_should_return_female_when_the_name_is_from_female_gender():
detector = GenderDetector()
expected_gender = detector.run(‘Ana’)
assert expected_gender == ‘female’
Direct recursion occurs when a function (fun) calls itself within the function
void directFun(){
//some code
directFun();
//more code
};
Indirect recursion occurs when two functions call each other directly or indirectly until a condition is met
void indirectFun1(){
//code
indirectFun2();
//code
}
void indirectFun2(){
//code
indirectFun1();
//code
}
import <module_name>
from <module_name> import <name(s)> as <alt_name>
<name(s)>
as <alt_name>
is optional