Allow unexpectedSuccess and expectedFailure
Allow unexpectedSuccess and expectedFailure

Python 3.4, and unittest2 0.8, error on unexpected successes
and warn on expected failure, if those conditions are not handled.

As these are used in pywikibot tests to capture current (usually wrong)
behaviour, and unexpected successes may be due to varying data and even
execution time in the case of script tests, it is not desirable
to fail the build as a consequence.  They need to be investigated
by a human to determine why the behaviour changed.

One way to handle them is to add hooks on the TestCase subclass,
_addUnexpectedSuccess and _addExpectedFailure.  This patch uses
that approach, reporting to stdout 'unexpected success' and
'expected failure', and marks the test as a success.  This closely
resembles the behaviour in Python 2.7, 3.3 and unittest2 0.6.

Change-Id: I8468cb4507414d55f38ec1f73beda311029f4f44

magul/pywikibot-core,h4ck3rm1k3/pywikibot-core,magul/pywikibot-core,h4ck3rm1k3/pywikibot-core,hasteur/g13bot_tools_new,Darkdadaah/pywikibot-core,VcamX/pywikibot-core,hasteur/g13bot_tools_new,happy5214/pywikibot-core,jayvdb/pywikibot-core,Darkdadaah/pywikibot-core,TridevGuha/pywikibot-core,trishnaguha/pywikibot-core,happy5214/pywikibot-core,wikimedia/pywikibot-core,wikimedia/pywikibot-core,xZise/pywikibot-core,hasteur/g13bot_tools_new,npdoty/pywikibot,icyflame/batman,darthbhyrava/pywikibot-local,smalyshev/pywikibot-core,valhallasw/pywikibot-core,emijrp/pywikibot-core,PersianWikipedia/pywikibot-core,jayvdb/pywikibot-core,npdoty/pywikibot