nose-devs / nose

nose is nicer testing for python
http://readthedocs.org/docs/nose/en/latest/
1.36k stars 396 forks source link

TestCase.shortDescription returns inconsistent output during the execution of a test #826

Open parautenbach opened 10 years ago

parautenbach commented 10 years ago

I am using Python 2.7.7 as part of the Anaconda 2.0.1 distribution, together with nosetests and the teamcity-messages plugin to execute tests.

As noted in #30 of the teamcity-messages project, different values are returned by shortDescription when invoked in startTest and stopTest respectively via the getTestName helper in the teamcity-messages project, during the execution of a single test.

I've checked the Python project's source code and it seems unlikely to be the cause of this problem.

I'm running nosetests with verbosity set to 2.

jszakmeister commented 10 years ago

I believe this is probably a dupe of #777. Does my cache-short-description fix the issue for you?

parautenbach commented 10 years ago

Thanks for the feedback. I wasn't aware of that issue (I couldn't find it when searching). Yes, it seems like a duplicate. I will test your code locally. For now, I've made a change to the teamcity-messages project as a workaround. Have you created a pull request that can be integrated into a future release?

As I'm using this in an automated environment, I need to pull from PyPI, and rather avoid patching code manually.

jszakmeister commented 10 years ago

@parautenbach No, I have not yet. In the commit message you can see I was contemplating another approach to the issue, but I haven't had enough "roundtuits" to get to examining the alternate approach.

jszakmeister commented 10 years ago

@parautenbach One option, if you're using pip, might be to make use of pip's Git support--just to help test the fix.