Skip to content
Snippets Groups Projects
Commit 789018a4 authored by jkerdreu's avatar jkerdreu
Browse files

some tests

git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/0.7@2410 b32b6428-25c9-4566-ad07-03861ab6144f
parent 697635d1
No related branches found
No related tags found
No related merge requests found
from yeelight import Bulb
bulb = Bulb('192.168.1.162')
import logging
logging.basicConfig(level=logging.DEBUG)
def print_props():
print("=" * 80)
print(bulb.get_properties())
bulb.turn_on()
print_props()
bulb.set_color_temp(4500)
print_props()
bulb.turn_off()
print_props()
import tenacity
import inspect
class FooError(Exception):pass
TENACITY_RETRY=tenacity.stop_after_attempt(2) | tenacity.stop_after_delay(10)
@tenacity.retry(stop=TENACITY_RETRY)
def foo(bar):
print(bar)
raise(FooError)
specs=inspect.getargspec(foo)
print(specs)
f = foo('bar')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment