-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtest.py
More file actions
36 lines (28 loc) · 954 Bytes
/
Copy pathtest.py
File metadata and controls
36 lines (28 loc) · 954 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
def test_add_one():
from broken_python import add_one
assert add_one(1) == 2
def test_average():
from broken_python import average
assert average(1, 2) == 1.5
def test_calculate_power():
from broken_python import calculate_power
assert calculate_power(10, 10) == 1
def test_pi_squared():
from broken_python import pi_squared
from math import pi
assert pi_squared() == pi**2
def test_check_equality():
from broken_python import check_equality
assert check_equality(1.5, 1.5)
def test_exponentiate():
from broken_python import exponentiate
assert exponentiate(0) == 1
def test_check_capitals():
from broken_python import check_capitals
assert check_capitals("OMG")
def test_censor_github():
from broken_python import censor_github
assert censor_github("github") == "g****b"
def test_count_vowels():
from broken_python import count_vowels
assert count_vowels("hello") == 2