http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9835
Revision: 9835
Author: valhallasw
Date: 2012-01-21 13:37:55 +0000 (Sat, 21 Jan 2012)
Log Message:
-----------
Updated tests:
* removed GFF test - this breaks all other tests due to monkey patching
* added date.py test (slow!)
* removed the raw_input hack, which breaks set_trace() in tests
Modified Paths:
--------------
trunk/pywikipedia/tests/test_generate_family_file.py
Added Paths:
-----------
trunk/pywikipedia/tests/test_date.py
Removed Paths:
-------------
trunk/pywikipedia/tests/__init__.py
Deleted: trunk/pywikipedia/tests/__init__.py
===================================================================
--- trunk/pywikipedia/tests/__init__.py 2012-01-21 13:15:04 UTC (rev 9834)
+++ trunk/pywikipedia/tests/__init__.py 2012-01-21 13:37:55 UTC (rev 9835)
@@ -1,6 +0,0 @@
-import __builtin__
-
-def raw_input(*args, **kwargs):
- raise Exception("No raw_input allowed in tests")
-
-__builtin__.raw_input = raw_input
Added: trunk/pywikipedia/tests/test_date.py
===================================================================
--- trunk/pywikipedia/tests/test_date.py (rev 0)
+++ trunk/pywikipedia/tests/test_date.py 2012-01-21 13:37:55 UTC (rev 9835)
@@ -0,0 +1 @@
+from date import test as test_date
Modified: trunk/pywikipedia/tests/test_generate_family_file.py
===================================================================
--- trunk/pywikipedia/tests/test_generate_family_file.py 2012-01-21 13:15:04 UTC (rev
9834)
+++ trunk/pywikipedia/tests/test_generate_family_file.py 2012-01-21 13:37:55 UTC (rev
9835)
@@ -1,3 +1,6 @@
+if __name__ != "__main__":
+ raise Exception("generate_family_file can only be tested using the manual test
runner due to monkey patching")
+
import sys, os
sys.path.append(os.getcwd())