holger krekel
6b0db18eca
two fixes for Jython
...
--HG--
branch : trunk
2010-10-07 08:55:44 +02:00
holger krekel
253c173a88
skip attribute tests on <(2,6)
...
--HG--
branch : trunk
2010-10-06 19:57:14 +02:00
holger krekel
7e3ff100f6
add to assertion related changelog
...
--HG--
branch : trunk
2010-10-06 19:46:31 +02:00
Floris Bruynooghe
ec5ea5c05e
Show final value first when explaining an attribute
...
Then show the expansion as a "where" part of the explanation.
--HG--
branch : trunk
2010-10-06 18:20:09 +01:00
holger krekel
c62ed0cd93
fix changelog
...
--HG--
branch : trunk
2010-10-06 16:26:55 +02:00
holger krekel
eccc2a868c
fix issue126 : introduce py.test.set_trace() to allow dropping to
...
interactive debugging even when py.test is configured to capture output.
If you like you can override pdb.set_trace by default like this:
# content of conftest.py
def pytest_configure():
import py, pdb
pdb.set_trace = py.test.set_trace
--HG--
branch : trunk
2010-10-06 14:48:24 +02:00
holger krekel
60a9b60634
remove unccessary code from pdb plugin
...
--HG--
branch : trunk
2010-10-06 11:55:12 +02:00
antocuni
94c2fd4033
fix the annoying interaction between "pdb.set_trace()" and --pdb. The problem
...
is that pdb raises BdbQuit on exit, which is then caught by --pdb, showing an
unwanted pdb prompt. Fix it by making --pdb to ignore BdbQuit
--HG--
branch : trunk
2010-10-06 14:28:06 +02:00
holger krekel
fe54762b93
fix tests to avoid pyc-caching and skip python2.4 which doesn't support "python -m" on packages.
...
--HG--
branch : trunk
2010-10-06 09:40:14 +02:00
holger krekel
89c53de084
remove unused args
...
--HG--
branch : trunk
2010-10-05 17:56:37 +02:00
holger krekel
eead8f9ab4
fix issue123 - new "python -m py.test" invocation.
...
--HG--
branch : trunk
2010-10-05 17:52:32 +02:00
holger krekel
7c6e47f715
fix issue124 - make test reporting more resilient against tests changing FD 1
...
--HG--
branch : trunk
2010-10-05 17:21:50 +02:00
holger krekel
cebcdb83cf
refine printing of exceptions via the pluginmanager.
...
if there is no pytest_internalerror() hook acknowledging
receival we print the exception to sys.stderr. This helps
to see issues when there are failures in TerminalReporter
initialization.
--HG--
branch : trunk
2010-10-05 17:21:41 +02:00
holger krekel
a054b63bac
introduce py.builtin.any
...
--HG--
branch : trunk
2010-10-05 17:21:27 +02:00
holger krekel
6892dc47a3
use repr() to print extra / differing values in assertion comparison failures
...
and guard against failures in detail-representations
--HG--
branch : trunk
2010-10-04 18:49:30 +02:00
holger krekel
f6da7ea0a5
remove config.getinitialnodes() method that was only used for testing method after the refactoring.
...
--HG--
branch : trunk
2010-10-04 16:55:03 +02:00
holger krekel
29051458fc
fix issue 109 - sibling conftest.py files shall not be loaded.
...
also simplify / refine tests a bit.
--HG--
branch : trunk
2010-10-04 16:19:01 +02:00
holger krekel
4eb45dab08
small simplification and shuffling of python tests, no content change
...
--HG--
branch : trunk
2010-10-04 11:04:15 +02:00
holger krekel
939a53c436
fix a problem and make a note about pytest_nose calling setup/teardown functions
...
--HG--
branch : trunk
2010-10-03 11:17:37 +02:00
holger krekel
a6003ac332
some fixes after the merge
...
--HG--
branch : trunk
2010-10-02 20:49:24 +02:00
holger krekel
63bb9efd29
merge heads
...
--HG--
branch : trunk
2010-10-02 19:36:15 +02:00
holger krekel
77cacb99ee
to better match the naming of the corresponding AST (and in case
...
we want to add more customizations later)
rename pytest_assert_binrepr -> pytest_assertrepr_compare
rename binrepr -> reprcompare
--HG--
branch : trunk
2010-10-02 19:00:47 +02:00
holger krekel
1ff173baee
refactor assert interpretation to invoke a simple callable
...
and let the assertion plugin handle the hook invocation
and its multi-results and also pass in an (optional) test config
object to the hook. Add and refactor also a few tests.
--HG--
branch : trunk
2010-10-02 18:47:39 +02:00
holger krekel
b56d3c223d
merge Floris branch and skip interpret-tests on python2.4
...
--HG--
branch : trunk
2010-10-02 16:15:02 +02:00
Floris Bruynooghe
cd5676adc4
Truncate the text passed to difflib where possible
...
This stops difflib from printing many lines which had no change in
them anyway. It also avoids a bug in difflib which fails or hangs
when there are many trailing lines which are all identical.
--HG--
branch : trunk
2010-09-30 23:15:41 +01:00
holger krekel
e2c11f1ddb
fix python3 issues, add py32 environment
...
--HG--
branch : trunk
2010-09-28 17:37:20 +02:00
holger krekel
81ec29a597
fix python3 bugs
...
--HG--
branch : trunk
2010-09-28 16:38:46 +02:00
holger krekel
88915aa57d
fix tox.ini invocation
...
--HG--
branch : trunk
2010-09-28 15:58:23 +02:00
holger krekel
e2e01a8585
refine reporting a bit, show only "dots" for distributed testing
...
--HG--
branch : trunk
2010-09-28 15:53:10 +02:00
holger krekel
a60e470573
fix a collection bug where a: 🅱️ :c could not be resolved properly if
...
there are multiple 'b' nodes.
--HG--
branch : trunk
2010-09-28 15:24:36 +02:00
holger krekel
f779d3f863
rework session instantiation and exitstatus handling
...
--HG--
branch : trunk
2010-09-28 12:59:48 +02:00
holger krekel
2718fccfa0
make "tools-on-path" the default and add new random fnmatch-matching method
...
--HG--
branch : trunk
2010-09-27 20:48:30 +02:00
holger krekel
a2fe6714f8
implement pytest_runtest_logstart(nodeid, location) hook
...
factor out a NodeInfo helper, and streamline terminal printing a bit
--HG--
branch : trunk
2010-09-26 16:23:45 +02:00
holger krekel
1c020c3d32
shift reporting info generation away from terminal reporting time, simplify code.
...
also get rid of redundant 'shortrepr' on collect/test reports
and rename reportinfo to "location" in some places
--HG--
branch : trunk
2010-09-26 16:23:44 +02:00
holger krekel
7d1585215d
clean up and simplify startup test protocols and objects
...
introduce some new experimental hooks pytest_runtest_mainloop
to better integrate distributed testing
--HG--
branch : trunk
2010-09-26 16:23:43 +02:00
holger krekel
2cf22e3124
shift all python related testing functioanlity to a dedicated
...
pytest_python
plugin which incorporates pytest's logic of python function testing (including funcargs).
--HG--
branch : trunk
2010-09-25 18:23:26 +02:00
Floris Bruynooghe
c3166ee84a
Fix bug when the right list was longer then the left
...
Thanks to Holger for finding this.
--HG--
branch : trunk
2010-09-22 18:52:07 +01:00
Floris Bruynooghe
56b955dfb5
Make pytest_assert_binrepr work on python3 too
...
--HG--
branch : trunk
2010-09-22 18:42:04 +01:00
Floris Bruynooghe
4b2cb3acbe
Merge tip from py-trunk.
...
--HG--
branch : trunk
2010-09-22 18:14:59 +01:00
Floris Bruynooghe
ca84a5e8e0
Rename pytest_assert_compare to pytest_assert_binrepr
...
Holger prefers to only have one hook and it also turns out that "in"
is actually a ast.Compare node as well too.
This also modifies the pytest_assert_binrepr hook slightly so that
it's more accomodating to other operators then just compare (i.e.
don't bail out as soon as the types of the operands differ).
--HG--
branch : trunk
2010-09-22 00:56:39 +01:00
Floris Bruynooghe
b86207a6c1
Don't load py.test.config inside py._code._assertionnew
...
Loading py.test.config triggers py.test initialisation while py.code
should stay independent of py.test. By adding the hook as an
attribute to py.test AssertionError py.code can get access to the
hooks only when py.test is loaded already.
--HG--
branch : trunk
2010-09-22 00:26:12 +01:00
Floris Bruynooghe
abab8f6f63
Move all tests to test_pytest_assertion
...
The py.code code is independent of any py.test specifics so we should
avoid creating dependencies on py.test in those parts.
--HG--
branch : trunk
2010-09-18 13:03:28 +01:00
Floris Bruynooghe
0af90e0962
Add specialised explanations to the demo
...
This currently breaks the test_failuers.py example as that file counts
the number of failures in the demo. But this demo isn't fixed yet so
we'll leave it for now.
--HG--
branch : trunk
2010-09-16 01:07:53 +01:00
Floris Bruynooghe
58169edc8e
Add set comparison
...
Also add a (too) simple mechanism too truncate too long explanations.
--HG--
branch : trunk
2010-09-16 01:06:07 +01:00
holger krekel
e2683f4538
refactor all collection related logic
...
- drop all pickling support (for now)
- perform collection completely ahead of test running (no iterativity)
- introduce new collection related hooks
- shift all keyword-selection code to pytest_keyword plugin
- simplify session object
- besides: fix issue88
--HG--
branch : trunk
2010-09-15 10:30:50 +02:00
holger krekel
350ebbd9ad
Added tag 1.3.4 for changeset 90fffd35373e
...
--HG--
branch : trunk
2010-09-14 17:35:17 +02:00
holger krekel
bb6e9848b3
recreated plugin docs
...
--HG--
branch : trunk
2010-09-14 17:35:01 +02:00
holger krekel
489faf26f2
Added tag 1.3.4 for changeset 79ef63777051
...
--HG--
branch : trunk
2010-09-14 16:54:41 +02:00
holger krekel
9ca7ed647b
finalize release announce and changelog
...
--HG--
branch : trunk
2010-09-14 16:36:34 +02:00
holger krekel
79734420df
some small doc fixes
...
--HG--
branch : trunk
2010-09-14 16:18:06 +02:00