← Winnitude! Search  ·  Reader Mode (2479 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 22 LINKS

Fix tests that are broken under Python 2.7. by marcusrbrown · Pull Request #86 · gitpython-developers/GitPython

Repository navigation

Fix tests that are broken under Python 2.7. - #86


Closed
marcusrbrown wants to merge 2 commits into gitpython-developers:0.3 from marcusrbrown:fix/0.3/py2.7-unittest
Closed

Fix tests that are broken under Python 2.7. #86 marcusrbrown wants to merge 2 commits into gitpython-developers:0.3 from marcusrbrown:fix/0.3/py2.7-unittest

Conversation

marcusrbrown commented Jan 11, 2013



Copy link Copy Markdown
Contributor

In Python 2.7, the unittest module was revamped to match the Python 3 version. Python 2.7 unittest doesn't run class fixtures if the class method isn't named setUpClass(). This fixes the tests that throw AttributeError under Python 2.7 (also mentioned in Issues #20 and #62 ):

"AttributeError: 'TestGit' object has no attribute 'rorepo'"

I also tested under Python 2.6 to ensure that those tests would still run. I have a similar patch incoming on master.

Fix tests that are broken under Python 2.7. 56f21b2 marcusrbrown mentioned this pull request Jan 11, 2013 Fix test broken under Python 2.7 unittest. #87 Closed Rename tearDownAll to tearDownClass() for Python 2.7 compatibility. e1f1b4e

Byron commented Nov 19, 2014



Copy link Copy Markdown
Member

Thank you.
This fix is already integrated by now.

Byron closed this Nov 19, 2014 Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment

Labels

None yet

2 participants