def test_square_return_value_type_is_int(inputs):
    # When 
    subject = square(inputs)

    #Then

    assert isinstance(subject, int)
def test_return(inputs):
	val = square(inputs)

	assert isinstance(val, int)
Exemplo n.º 3
0
def test_square(input_value):
    val = square(input_value)

    assert val == 25
Exemplo n.º 4
0
def test_square:
	subject = square(4)

	assert subject == 16
def test_square_returns_correctly():
    # When
    subject = square(2)

    # then
    assert subject == 4
Exemplo n.º 6
0
import my_module


my_module.square("red")
my_module.circle("blue")
my_module.anyshape(8,"green")

Exemplo n.º 7
0
def test_square_gives_correct_value(input_value):
    #When
    subject = square(input_value)

    #Then
    assert subject == 16
Exemplo n.º 8
0
# -*- coding:utf8 -*-
import my_module
print(my_module.multi(3, 4))

print(my_module.square(1.414))
import my_module

print(dir())

for i in range(0, 100):
    string = " {0} squared is {1}, {0} cubed is {2} ".format(
        str(i), str(my_module.square(i)), str(my_module.cube(i)))
    string = string.center(160, '*')
    print(string)

#Look up Python Paths in order to look for Modules in non CWD places