chore: README updated with KATA description feat: added kata_the_lamp.py test: added test_the_lamp.py for testing kata

This commit is contained in:
zimmersandro committed 2026-03-02 18:45:55 +01:00
1 parent bc6f7e27aa
commit 515df4d452
2 files changed
+26

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
from src.codewars.kata_the_lamp import Lamp
def test_lamp():
my_lamp = Lamp("Blue")
assert my_lamp.color == "Blue"
assert not my_lamp.on
assert my_lamp.state() == "The lamp is off."
my_lamp.toggle_switch()
assert my_lamp.state() == "The lamp is on."
my_lamp.toggle_switch()
assert my_lamp.state() == "The lamp is off."