Last active
February 25, 2020 20:20
-
-
Save IlianIliev/30543d255659617e9837db86deabc904 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# AAA - Triple A is the base of testing. It stands for Arrange, Act, Assert | |
# Ако правилно съм разбрал правиш някакъв тул за автоматизация. | |
# Да кажем, че имаш някакъв сет от лампи и искаш да напишеш метод който | |
# проверява колко лампи са светнати в даден момент | |
class Lamp: | |
pass | |
def test_counter(): | |
# Arrange | |
lamp_a = Lamp(on=True) | |
lamp_b = Lamp(on=False) | |
lamp_c = Lamp(on=False) | |
# Act | |
res = count_lights_on([lamp_a, lamp_b, lamp_c]) | |
# Assert | |
assert res == 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment