<commit_before><commit_msg>add test case for observer<commit_after>from __future__ import with_statement
from sikuli.Sikuli import *

def changed(event):
   print "changed!: " + str(event)

def appeared(event):
   print "apple appeared " + str(event)

def vanished(event):
   print "apple vanished " + str(event)

with Region(0,0,300,300):
   onChange(changed)
   onAppear("test-res/apple.png", appeared)
   onVanish("test-res/apple.png", vanished)
   observe(5)
{'fraction_non_alphanumeric': 0.12987012987012986, 'fraction_numerical': 0.01948051948051948, 'mean_word_length': 5.173333333333333, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3425062', 'n_tokens_mistral': 159, 'n_tokens_neox': 155, 'n_words': 36}