title: Nose/Unittest different tests dependent on Python version
body: <p>I am writing <a href="https://travis-ci.org/pydata/pandas/jobs/75838430" rel="nofollow">a nose test</a> for an API addition to pandas I'm writing. They use Travis CI to run their test suites.</p>
  
  <p>In the version of Python I'm using (Python 2.7.6, numpy 1.9.2) the following raises a <code>TypeError</code>:</p>
  
  <pre><code>&gt;&gt;&gt; numpy.round([1.23, 1.132], 2.5)
  TypeError: integer argument expected, got float
  </code></pre>
  
  <p>But in a version being tested against by Travis CI (Python 2.6.9, numpy 1.9.2) the same command raises a warning:</p>
  
  <pre><code>&gt;&gt;&gt; numpy.round([1.23, 1.132], 2.5)
  /home/some_user/anaconda/envs/py26/lib/python2.6/site-packages/numpy/core/fromnumeric.py:45: DeprecationWarning: integer argument expected, got float
    result = getattr(asarray(obj), method)(*args, **kwds)
  array([ 1.23,  1.13])
  </code></pre>
  
  <p>This means that my <code>assertRaises(TypeError)</code> test fails.</p>
  
  <p>How can I write a test which will either check for <code>TypeError</code> or do <code>assert_produces_warning(DeprecationWarning)</code> depending on what Python version is being tested?</p>