มีอะไรใช้แทน @expect ของ Junit4 บน test unit ของ Python หรือเปล่าครับ?
warning: realpath() [function.realpath]: SAFE MODE Restriction in effect. The script whose uid is 1005 is not allowed to access /tmp owned by uid 0 in /var/www/sites/sugree/codenone.com/subdomains/www/html/includes/file.inc on line 190.
warning: realpath() [function.realpath]: SAFE MODE Restriction in effect. The script whose uid is 1005 is not allowed to access /tmp owned by uid 0 in /var/www/sites/sugree/codenone.com/subdomains/www/html/includes/file.inc on line 190.
ทำ decorator ก็ได้นะ หรือจะใช้ assert ก็ดี
assert False, func() == 0อันนี้เรียกเดี่ยวใช้ได้ใส่ test unit เจ๊ง -_-'
ใช้ unittest รึเปล่าเนี่ย
nosetest มันไปเรียก unittest อีกทีปะครับ?
อันที่มี @expect nose มันจะไม่ถูก test เลย. หรือพูดอีกอย่างคือตัวอย่างข้างบนจะเหลือแค่ test เดียว
---
http://openil.wordpress.com/
สงสัยจะคนละตัว ใช้ unittest จะเขียนอีกแบบ
แบบนี้น่าจะ unittest แน่ๆ? ก็เจ๊งอยู่ดี.
---
http://openil.wordpress.com/