Пример #1
0
def test_1():
    assert calculate('2*2') - 4 < 0.0001
Пример #2
0
def test_2():
	assert calculate('whats the mass of moon')
Пример #3
0
def test_4():
    assert calculate('im too awesome').startswith('Too bad')
Пример #4
0
def test_5():
    assert calculate('berkeley california').count('population') == 3
Пример #5
0
def test_3():
    assert calculate('mass of the sun in kg').startswith('1.988435')
Пример #6
0
def test_2():
    assert calculate('4**3+7*8') == 120
Пример #7
0
def test_3():
	assert abs(6.-calculate('1+2+3'))<0.001
Пример #8
0
def test_1():
	assert abs(4.-calculate('2**2'))<0.001
Пример #9
0
def test_4():
	assert calculate('density of water')