| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| | |
Fix #786: generator method fails with callable instance
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
This is a continuation of the fix started in 192694ed for issue #783.
Pypy didn't like the tactic taken, so let's be a little more direct
about it. We're expecting a function, and if we don't get it then we
want to look at the `__call__()` attribute.
|
|/
|
|
|
|
| |
Upstream changeset http://hg.python.org/cpython/rev/791674a74e47
switched format from %s to %r, so we need to add some ellipses
to work with both old and new versions.
|
|
|
|
|
|
| |
With the new top-level domains, x.y.z became a valid domain name. The
IETF has set stated that .invalid may not be installed as a top-level
domain, so let's use x.y.invalid instead.
|
|\
| |
| | |
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).
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| | |
| | |
| | |
| | | |
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.
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| | |
| | | |
Added NOSE_IGNORE_CONFIG_FILES as env variable option
|
| |/ |
|
|/
|
|
| |
__init__.py
|
|
|
|
|
|
|
|
| |
When loading tests from a compiled extension, the result of
`getpackage(filename)` can be None, causing an error in
`DocTestCase.id()` when it tries to use the result as a string. To fix
this, let's return the name of the doctest itself just like an
alternate path in `DocTestCase.id()`.
|
|\
| |
| | |
fix #135 and update plugin documentation
|
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes #135 and #511. Some exceptions, like a KeyError, could cause
the error output to become mangled. To prevent this, we'll re-wrap the
error output in an Exception so that it can be formatted correctly by
the remaining layers. A test has also been added to prevent further
regressions.
|
|\ \
| | |
| | | |
Fix most resource warnings under 3.2 and 3.3.
|
| | | |
|
|\ \ \
| | | |
| | | | |
Fix formatFailure expection if missing tb in exc_info
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The FailureDetail plugin should not fail in formatFailure if no
traceback is in the exc_info tupple ('err' parameter). This happens,
e.g. when used with testtools:
Traceback (most recent call last):
File "/usr/lib64/python2.6/site-packages/nose/case.py", line 133, in run
self.runTest(result)
File "/usr/lib64/python2.6/site-packages/nose/case.py", line 151, in runTest
test(result)
File "/usr/lib64/python2.6/unittest.py", line 300, in __call__
return self.run(*args, **kwds)
File "/usr/lib64/python2.6/site-packages/testtools/testcase.py", line 518, in run
return self.__RunTest(self, self.exception_handlers).run(result)
File "/usr/lib64/python2.6/site-packages/testtools/runtest.py", line 74, in run
return self._run_one(actual_result)
File "/usr/lib64/python2.6/site-packages/testtools/runtest.py", line 88, in _run_one
return self._run_prepared_result(ExtendedToOriginalDecorator(result))
File "/usr/lib64/python2.6/site-packages/testtools/runtest.py", line 107, in _run_prepared_result
handler(self.case, self.result, e)
File "/usr/lib64/python2.6/site-packages/testtools/testcase.py", line 494, in _report_failure
result.addFailure(self, details=self.getDetails())
File "/usr/lib64/python2.6/site-packages/testtools/testresult/real.py", line 605, in addFailure
return self.decorated.addFailure(test, err)
File "/usr/lib64/python2.6/site-packages/nose/proxy.py", line 146, in addFailure
formatted = plugins.formatFailure(self.test, err)
File "/usr/lib64/python2.6/site-packages/nose/plugins/manager.py", line 99, in __call__
return self.call(*arg, **kw)
File "/usr/lib64/python2.6/site-packages/nose/plugins/manager.py", line 141, in chain
result = meth(*arg, **kw)
File "/usr/lib64/python2.6/site-packages/nose/plugins/failuredetail.py", line 41, in formatFailure
tbinfo = inspect_traceback(tb)
File "/usr/lib64/python2.6/site-packages/nose/inspector.py", line 26, in inspect_traceback
while tb.tb_next:
AttributeError: 'NoneType' object has no attribute 'tb_next'
|
|\ \ \ \
| |_|_|/
|/| | | |
Fix: missing method on test class from another module raises error
|
| |/ / |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Bugfix for the issue #109: Fails to properly parse NOSE_COVER_PACKAGE
environment variable. Also added a test.
Note: I did not merge the other patch on this branch (ffc3701) because
I'm not sure it's the right fix.
|
| | | |
| | | |
| | | |
| | | | |
This also provides a place to do more testing of the coverage plugin.
|
|\ \ \ \
| |_|_|/
|/| | | |
Use `nose.__loader__` to load 'usage.txt', if available.
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | | |
Previously we only used `nose.__loader__` if we thought
that the loader was zipimporter. Additionally, we use
`nose.__file__` to build the path to 'usage.txt' as
suggested by PEP-302.
|
|/ / |
|
|\ \ |
|
| |/ |
|
|\ \
| | |
| | | |
Make logcapture log mutable objects consistently
|
| |/
| |
| |
| |
| |
| | |
mutables.
This is a fix for https://github.com/nose-devs/nose/issues/561
|
|\ \
| | |
| | | |
Teach xunit to capture stdout...
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Change the score of Xunit to place it before the Capture plugin. We
don't want the Capture plugin to change the streams before the tests are
run. At a score of 2000, that's exactly what happens, so let's make it
499 instead (Capture's score - 1).
Have Xunit replace the stream with a Tee object of just swapping the
stream. This allows the Capture plugin to see the data from stdout,
even though we've replaced the stream, allowing it to function exactly
as you would expect it to.
Finally, we maintain a stack of streams, instead of just a single
stream. I don't believe this is entirely necessary though.
|
|/ |
|
| |
|
|
|
|
|
|
| |
frames. Closes #453.
I divided the tools into two buckets: trivial, which should not have their stack frames exposed in tracebacks; and nontrivial, which should. The tools module becomes a package, and everything stays backward-compatible.
|
|\ |
|
| | |
|
| | |
|
| |\ |
|
| | | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Issue #412 : Attributes don't work on inherited test method
Issue #411 : Plugin doesn't work on classes containing static methods
Issue #324 : Mixing method and class attributes doesn't work
Issue #381 : Plugin doesn't work on classes containing methods with no __dict__ (e.g., from boost.python)
Issue #382 : Dupe of #381 with less info
* When used as class decorator, attr() was only applying the attributes to methods with names starting with "test_". It would skip, e.g., my_cool_test.
* The class decorator form of attr() did not work for test methods inherited from parent classes, nor were the attributes inherited by child classes. They also didn't work for methods added to the class later (e.g., by another decorator).
The primary changes are to use getattr/ setattr exlusively rather than direct access to __dict__ and to remove the (unneeded and problematic) wantClass method. Most of the bugs were caused by __dict__ access or wantClass not doing the right thing. In addition to fixing the above bugs, these changes make the plugin smaller and simpler to understand.
Add regression tests for fixed bugs.
Change
assert not plug.wantFunction(h)
to
assert plug.wantFunction(h) is False
where plug.wantFunction only return None or False
Refactor duplicated code in functional tests into base class.
|
| | |
|
| |
| |
| |
| | |
Some tests also needed tuning to pass consistently in all versions of Python.
|
| |
| |
| |
| | |
Patch by Rosen Diankov. Note: failing in Python 3, still needs work.
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|