Commit Graph

3516 Commits

Author SHA1 Message Date
holger krekel ebd10aa6b4 shrink and merge the somewhat obscure and undocumented internal hinting
system with the new warnings one
2014-03-11 22:10:51 +01:00
holger krekel 24db492f53 warn if instances are callable and have a test name 2014-03-11 22:10:18 +01:00
holger krekel 1b387bea62 introduce warning system with this API:
- node.warn() for a node-specific warning
- config.warn() for a global non-node specific warning

Each warning is accompanied by a "warning number" so that we can later
introduce mechanisms for surpressing them.

Each warning will trigger a call to pytest_report_warn(number, node, message)
which is by default implemented by the TerminalReporter which introduces
a new option "-rw" to show details about warnings.
2014-03-11 22:10:17 +01:00
Thomas Grainger 9528b64f7f pep8 good practices code
--HG--
branch : graingert/pep8-good-practices-code-1394196858258
2014-03-07 12:51:51 +00:00
holger krekel b96559149c Merged in jurko/pytest/pdb_doc_update (pull request #118)
update PDB related pytest docs
2014-03-06 08:36:42 +01:00
Chris Gilling 3388d82c1c Fix to work properly when @patch is used with new not equal to DEFAULT
also updated test_mock to include this situation
2014-03-03 10:36:59 -08:00
Jurko Gospodnetić 9985a7cdca fix documentation typo
--HG--
branch : doc_typo_correction
2014-03-02 22:52:38 +01:00
Bruno Oliveira 1d00c5e109 Using github and bitbucket icons on plugins_index page
--HG--
branch : integrate-plugin-index-docs
2014-02-18 22:40:36 -03:00
Bruno Oliveira 0559f11aa5 Improved text on plugins_index
- Removed "beta" status from it;
- Added links to pytest-plugs app;

--HG--
branch : integrate-plugin-index-docs
2014-02-18 21:33:13 -03:00
Bruno Oliveira 2893cddb68 plugins_index no longer has the package names hard-coded
small number of changes:
- removed hard-coded links to package release versions, using
  a placeholder "latest" instead which is understood by pytest-plugs
- testing against pytest-2.5.2

This changes were implemented so this page only needs
to be updated after pytest releases, not after each package version changes;.
2014-02-11 23:38:30 -02:00
Jurko Gospodnetić 6910641266 reword PDB usage documentation
Documented that since pytest 2.4.0 you can use the raw pdb.set_trace() call
directly without the pytest.set_trace() wrapper or explicitly disabling pytest's
output capture using 'py.test -s'.

Clearly stated how pytest (since version 2.0.0.) automatically disables its
output capture when entering an interactive PDB debugger. This avoids confusing
new users because their tests display different output when running with or
without entering an interactive debugger (even if user does nothing in that
interactive debugger session other than exit it and continue with the regular
test execution).

--HG--
branch : pdb_doc_update
2014-02-01 10:19:09 +01:00
Jurko Gospodnetić 4b81a07303 make all 'PDB' doc references be recognized as links
--HG--
branch : pdb_doc_update
2014-02-01 10:11:42 +01:00
Jurko Gospodnetić 7eb765578a correct inconsistent comment wording
Once the 'the' article was used before 'first' and once it was not, all within
the same code example.

--HG--
branch : pdb_doc_update
2014-02-01 10:07:54 +01:00
holger krekel e2cf3e0932 Added tag 2.5.2 for changeset 421d3b4d150d 2014-01-29 14:09:33 +01:00
holger krekel 1830de2c13 make it clear that this xfail is an unimplemented feature, nothing more. 2014-01-29 13:56:24 +01:00
holger krekel 25ab906b8b add release announcement, bump version to 2.5.2,
add links to plugins index, regenerate doc examples.
2014-01-29 13:47:11 +01:00
holger krekel 8a3b4b9c37 require py>=1.2.20 2014-01-29 13:11:40 +01:00
holger krekel 2b8a54d5d9 refine skipif to use direct booleans, to help with flakes 2014-01-29 11:46:36 +01:00
holger krekel 4eabfed651 refactor lsof checking and fix an lsof leak in pypy 2014-01-29 11:18:15 +01:00
holger krekel 505a34bb85 fix flakes failures 2014-01-29 10:20:13 +01:00
holger krekel 2dade6ed00 add changelog entry about issue429, adapt README 2014-01-29 09:00:14 +01:00
Floris Bruynooghe 825ea9bfa1 Fix assertrepr for mojibake
If the compared text was in bytes and not actually valid text
(i.e. could not be encoded to text/unicode using the default encoding)
then the assertrepr would fail with an EncodingError.  This ensures
that the internal string is always valid unicode, converting any bytes
safely to valid unicode.  This is done using repr() which then needs
post-processing to fix the encompassing quotes and un-escape newlines.

This fixes issue 429.
2014-01-29 00:42:58 +00:00
Floris Bruynooghe cc1186242c Avoid wasted string concatenation and improve english 2014-01-29 00:39:04 +00:00
holger krekel 86284689a3 simplify loop which turns direct funcarg parametrization to indirect 2014-01-27 12:53:44 +01:00
holger krekel c70d020bf3 allow positional args to tox invocation 2014-01-27 12:42:06 +01:00
holger krekel 4622c28ffd setupstate.addfinalizer(): fix docstring and remove related unit test not covering functional reality 2014-01-26 12:44:21 +01:00
holger krekel 899998cf9c Merged in hpk42/pytest-capsimple/capsimple1 (pull request #115)
some simplifications in capturing code
2014-01-26 12:07:45 +01:00
holger krekel 6f385fb4ea remove "mixed" capturing mode which is not used by pytest
--HG--
branch : capsimple1
2014-01-25 19:56:27 +01:00
holger krekel 18e12cbd67 remove "StdCapture*.call" classmethod because pytest does not use it.
--HG--
branch : capsimple1
2014-01-25 19:43:57 +01:00
holger krekel 3cf4e133cc remove now parameter because pytest only used now==False everywhere
--HG--
branch : capsimple1
2014-01-25 19:42:45 +01:00
holger krekel d53bfe0aa7 Merged in RonnyPfannschmidt/pytest/multi-usageerror (pull request #113)
Make one usage error for every argument that fails instead of bailing at the first only
2014-01-25 11:04:53 +01:00
Ronny Pfannschmidt 97da43d909 merge from default
--HG--
branch : multi-usageerror
2014-01-25 10:42:21 +01:00
holger krekel ee080ce8a5 Merged in jurko/pytest/remove_github_references (pull request #112)
remove references to the no longer used github mirror
2014-01-25 10:30:31 +01:00
Jurko Gospodnetić 741a3e8602 remove references to the no longer used github mirror
--HG--
branch : remove_github_references
2014-01-25 09:11:55 +01:00
Ronny Pfannschmidt 177637bfb9 Redo the Capture integration propperly 2014-01-24 21:22:19 +01:00
Piotr Banaszkiewicz ae64221c34 Contribution guide: added pull request button image 2014-01-24 20:01:04 +01:00
Piotr Banaszkiewicz 22017f11d0 Contribution guide: removed confusion regarding git 2014-01-24 19:37:44 +01:00
Piotr Banaszkiewicz c1eaad7d57 Contribution guide: added "what is pull request" section 2014-01-24 19:21:21 +01:00
holger krekel 8e6d538a57 address issue416: clarify docs as to conftest.py loading semantics 2014-01-23 15:25:01 +01:00
holger krekel 0836d74ae7 add Jurko to authors/contributors file 2014-01-23 15:08:24 +01:00
holger krekel a9e5bd52d3 remove github links 2014-01-23 14:50:58 +01:00
Anatoly Bubenkov b4b5e358c3 merge with mainline 2014-01-23 13:21:00 +01:00
Anatoly Bubenkov 4190809d1a remove the github contribution section 2014-01-23 13:19:49 +01:00
holger krekel 4e2a820c6a add Daniel Greensfeld 3-part blog series about pytest 2014-01-23 13:07:28 +01:00
holger krekel 14a43fffee have travis use the devpi index to get the pylib dependency 2014-01-23 12:18:20 +01:00
holger krekel 245d39f52d Merged in jurko/pytest/document_ExceptionInfo_ref_cycle (pull request #109)
document explicitly clearing local references to pytest.raises() results (redo of pull request #98)
2014-01-23 11:42:51 +01:00
holger krekel ac0b862f8f speak about "pytest" rather than "py.test". Thanks Jurko. 2014-01-23 11:42:20 +01:00
holger krekel c41db8ebbb refine contributing text in several places 2014-01-23 11:38:05 +01:00
Jurko Gospodnetić 75c124ea17 reword note on explicitly clearing local references to pytest.raises() results
Made it clearer that clearing such references is not mandatory and is only an
optional step which may help the Python interpreter speed up its garbage
collection.

--HG--
branch : document_ExceptionInfo_ref_cycle
2014-01-23 11:36:04 +01:00
Anatoly Bubenkov ab13c3f362 add explicit branch creation note 2014-01-23 10:51:45 +01:00