| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| |
| | |
The issue is that static methods get wrapped in an UnboundMethod object,
and the attribute plugin is unable to grab the associated class, since
UnboundMethod does not have the im_class attribute. Since the goal of
UnboundMethod is to mimic an actual method, let's go ahead and implement
the im_class attribute.
|
|\ \
| |/
|/| |
Fix #771: attr plugin is broken when parent overrides child method
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The issue is when the parent and child have different attributes, and
the parent method was being bypassed because of the attribute selection.
In this case, Nose would incorrectly use the version from the base
class, even though it was supposed to skip the method entirely.
To fix this, we need simply need to stop digging through base classes.
The dir() method returns a flattened set of methods, so there's no need
to iterate through the base classes trying to dig up all the methods.
Moreover, it leads to false positives since we were not keeping track of
methods seen on the parent classes. As a result, we'd incorrectly
select a test for inclusion (using attributes), or we'd pick up a method
that we should've ignored (like runTest in a Twisted test case).
Thanks to Thomas Grainger for providing a test case!
|
| |
|
|
|
|
| |
Regenerate the man page too.
|
| |
|
| |
|
|
|
|
|
| |
Under Jython this step fails badly and tanks Nose. Instead, emit a
warning about the failure to create the coverage reports, and move on.
|
|\
| |
| | |
Catch KeyboardInterrupt during test run.
|
| |
| |
| |
| |
| | |
...so that one can ^C a test run and still get a report of failed tests
and stack traces.
|
|\ \
| | |
| | | |
Instruct coverage instance to cover requested packages only.
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Fixed issue with builtin filtering.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The superclass (which ultimately inherits from 'Handler')
checks against any registered filters, before allowing a
logging record. Nose's logging capture plugin should do the
same, because these filters are allowed to modify the record.
And it can easily happen that the logging format requires
this modification (e.g. add an attribute).
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
Fix #743: fix an incorrect regex in writing_tests.rst.
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
I've had this problem numerous times and I know others have too. While the documentation does mention this under the --exe flag, it makes sense to put it here since this is where people are going to look first when they run into issues.
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix the test failures in issue 759.
|
|/ / / / / |
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Look for unittest2 in skip plugin
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
If unittest2 is available, try to use its SkipTest class rather than a
nose internal version. Inspired by better integration with testtools
for older python releases (see [1]).
[1] https://review.openstack.org/#/c/33056/
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Add test that transplants a function generator
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Currently failing due to issue 501. When the test is transplanted it is
wrapped in another function, which means that
inspect.isgeneratorfunction() returns False. There is already a fix for
this in pull 620.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The issue is that `transplant_func()` did not preserve function
generators correctly. It would wrap the transplanted function with a
decorator, and since no yield statement was present in the decorator,
we'd lose sight of whether the transplanted function was a generator
function.
To fix this, let's check whether the function is a generator function,
and if so, use a for/yield loop to pass the results back using a
generator causing the decorator function to be seen as a generator
function. This will preserve the fact that the supplied function was a
generator function.
|
|/ / / / / / |
|
|\ \ \ \ \ \
| |_|/ / / /
|/| | | | | |
Fixes issue #749.
|
| | | | | | |
|
| | | | | | |
|
|\ \ \ \ \ \
| |_|_|_|/ /
|/| | | | |
| | | | | |
| | | | | | |
Fixes some unicode errors/handling in several areas of Nose.
A special thanks to Thomas Kluyver (@takluyver) for all the reviews while getting this together.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
In Python 3, just str() the argument and return. In other Python
implementations, work a little harder to make sure that we return a
unicode string.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
In Python 3, just stringify the argument. In all other Python
implementations, let's attempt to use unicode() first, and then fallback
to using str() and decoding.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
In this case, the exception vector being passed in was a string that
contained encoded UTF-8 sequences. It was being converted to unicode
implicitly, which was raising a UnicodeDecodeError because some bytes
were >= 128. Make sure the exception string is converted to unicode
before trying to put the whole thing together.
Thanks to Guillaume Ayoub for the test case.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
While we're at it, teach format_exception() to use the new
exc_to_unicode() helper derived from work done in capture.py.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
It turns out that `Xunit` was very mix-brained about how to formulate
the blocks ultimately used for generating the report. In some parts,
the expectation was to put unicode strings into the blocks, and in
others it would insert encoded strings along with unicode strings into
the blocks. It's the latter that was ultimately causing the issue.
In particular, `_quoteattr` would sometimes receive a unicode string,
and then it would get translated into UTF-8. Then, it would get
inserted into a unicode string, which would cause Python to try and turn
the UTF-8 encoded string back into a unicode one, but it would default
to the ascii codec and fail.
This makes us use unicode everywhere, sometimes forcing the data into
unicode with replacement.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
BaseException didn't exist until Python 2.5. Let's create a helper in
pyversion to check whether we're derived from BaseException on Python
2.5 or better, and just Exception on Python 2.4.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Added NOSE_IGNORE_CONFIG_FILES as env variable option
|
| | | | | | | |
|
| | |_|_|_|/
| |/| | | | |
|
|\ \ \ \ \ \
| |_|_|_|_|/
|/| | | | | |
Fix Importer.importFromPath to be able to import modules whose names start with __init__
|
| | | | | | |
|
| | |/ / /
| |/| | |
| | | | |
| | | | | |
__init__.py
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Don't save zero-byte xunit test reports
|
|/ / / / |
|
| | | | |
|
| |_|/
|/| | |
|