예제 #1
0
def test_1():
    assert calculate('2*2') - 4 < 0.0001
예제 #2
0
파일: test_2.py 프로젝트: yigong/AY250
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
파일: test_3.py 프로젝트: yigong/AY250
def test_3():
	assert abs(6.-calculate('1+2+3'))<0.001
예제 #8
0
파일: test_1.py 프로젝트: yigong/AY250
def test_1():
	assert abs(4.-calculate('2**2'))<0.001
예제 #9
0
파일: test_4.py 프로젝트: yigong/AY250
def test_4():
	assert calculate('density of water')