收聽了JavaScript Weekly podcast後,我聽說了jQueryLocalStorageTexteareas插件,於是我決定嘗試自己實現這一點。 它的基本功能是在瀏覽器支持的情況下將textarea的內容保存到瀏覽器的本地存儲中。 我的問題是,我將如何寫在TDD風格?最高級別的測試實現將如何?它可能應該像 when I type foo in a text area
and I
請告訴我,如果這種方法是安全的,或者我可以使用而不是一個普通的線程來安全地將觸摸事件分配給我的活動,目的是從該onTouch()方法測試整個流程女巫觸發器。 //this is the thread which fires Touch Events to my main activity
public class Monkey extends Thread {
Run r;
我有一個doctest,當文件沒有找到時,它需要IOError。 >>> configParser('conffig.ini') # should not exist
Traceback (most recent call last):
...
IOError: No such file: /homes/ndeklein/workspace/MS/PyMS/conffig.ini