Commit Graph

3438 Commits

Author SHA1 Message Date
holger krekel 1ffc006363 fixed circular imports by reverting a few py.test -> pytest substitions. 2014-01-22 11:17:25 +01:00
holger krekel 836232e544 fix issue425: mention at end of "py.test -h" that --markers
and --fixtures work according to specified test path (or current dir)
2014-01-22 10:24:22 +01:00
holger krekel 2539e5a352 Merged in derdon/pytest/no-p-option (pull request #102)
added docs about the `no:` syntax for the -p option
2014-01-20 13:22:31 +01:00
Jurko Gospodnetić 8e457338ee fix handling MarkDecorators called with a single positional plus keyword args
When a MarkDecorator instance is called it does the following:
  1. If called with a single class as its only positional argument and no
     additional keyword arguments, it attaches itself to the class so it gets
     applied automatically to all test cases found in that class.
  2. If called with a single function as its only positional argument and no
     additional keyword arguments, it attaches a MarkInfo object to the
     function, containing all the arguments already stored internally in the
     MarkDecorator.
  3. When called in any other case, it performs a 'fake construction' call, i.e.
     it returns a new MarkDecorator instance with the original MarkDecorator's
     content updated with the arguments passed to this call.

When Python applies a function decorator it always passes the target class/
function to the decorator as its positional argument with no additional
positional or keyword arguments. However, when MarkDecorator was deciding
whether it was being called to decorate a target function/class (cases 1. & 2.
as documented above) or to return an updated MarkDecorator (case 3. as
documented above), it only checked that it received a single callable positional
argument and did not take into consideration whether additional keyword
arguments were being passed in as well.

With this change, it is now possible to create a pytest mark storing a function/
class parameter passed as its only positional argument and accompanied by one or
more additional keyword arguments. Before, it was only possible to do so if the
function/class parameter argument was accompanied by at least one other
positional argument.

Added a related unit test.

Updated MarkDecorator doc-string.
2014-01-20 01:27:33 +01:00
Simon Liedtke d92ee8c3c3 added docs about the `no:` syntax for the -p option
--HG--
branch : no-p-option
2014-01-19 22:05:14 +01:00
Jurko Gospodnetić 492c60c202 fix doc typo 2014-01-19 10:26:55 +01:00
holger krekel 86ef81454f fix name 2014-01-19 09:13:06 +01:00
holger krekel 675669c52e added changelog: fixed docs and code to use "pytest" instead of "py.test"
everywhere.  Thanks Jurko Gspodnetic for the complete PR.
2014-01-18 14:53:04 +01:00
holger krekel 92c5d395a2 Merged in jurko/pytest (pull request #100)
update README.rst docs - pytest is compatible with Python 2.5 instead of 2.4
2014-01-18 14:51:53 +01:00
Jurko Gospodnetić fa4ea1d9e8 update README.rst docs - pytest is compatible with Python 2.5 instead of 2.4 2014-01-18 13:11:17 +01:00
Jurko Gospodnetić 657a395839 fix comment typos 2014-01-18 12:39:16 +01:00
Jurko Gospodnetić 9fb2079458 replace py.test module references with pytest
The only remaining 'py.test' references are:
 * those referring to the 'py.test' executable
 * those in code explicitly testing py.test/pytest module compatibility
 * those in old CHANGES documentation
 * those in documentation generated based on external data
 * those in seemingly unfinished & unmaintained Japanese documentation

Minor stylistic changes and typo corrections made to documentation next to
several applied py.test --> pytest content changes.
2014-01-18 12:31:33 +01:00
Jurko Gospodnetić 83620ced2e trim trailing spaces 2014-01-18 10:40:20 +01:00
Bruno Oliveira 1fb824cd28 plugins_index: status images now link to actual tox output 2014-01-15 20:48:11 -02:00
Bruno Oliveira 0d35994fb8 Updated plugins_index.txt after changes in plugin_index.py 2014-01-15 20:32:11 -02:00
Bruno Oliveira 3a37f33d99 Improvements in plugins_index.txt
- Removed author and email in favor of repository link.
  Repository link is obtained from the 'home_page' field
  obtained from pypi. For plugins that don't have
  that field set, function obtain_override_repositories
  is used to override it in favor of known repositories url.

- Shortened "Python 2.7" in favor of "py27" to save space;
  Same for "Python 3.3".
2014-01-15 20:26:05 -02:00
Bruno Oliveira ddfb2d5f3a Removing test_plugins_index
This test seems unnecessary now, since after every change we have
to generate plugins_index.txt and manually check to ensure it is
correct.
2014-01-15 19:20:53 -02:00
holger krekel d81c0e9a92 remove build status that shows on pypi -- doesn't make sense because it shows the current trunk, not the released version. And start a new doc/en/status.txt 2014-01-11 10:46:07 +01:00
holger krekel 048cb71bf6 Merged in lakka/pytest//minor-doc-fix-in-skippingtxt-also-submi-1387492852421 (pull request #94)
Minor doc fix in skipping.txt.  Also submitted at Github before I realised that this was the master repo.  Will close over there.
2014-01-10 10:44:12 +01:00
Daniel Hahler 903fd144ff doc: fix desc for `parametrize`
- the parameter is called `expected`, not `output`
 - s/that that/that/
2014-01-09 22:27:23 +01:00
Jurko Gospodnetić d51e27a5cb correct documentation typo 2013-12-28 17:05:17 +01:00
holger krekel 064290a606 Merge pull request #11 from pmuller/patch-1
Fix minor typo in special.txt
2013-12-20 11:37:39 -08:00
Philippe Muller e6ae68c0cc Fix minor typo in special.txt 2013-12-20 14:01:17 +01:00
lakka 43f970ab6b Minor doc fix in skipping.txt. Also submitted at Github before I realised that this was the master repo. Will close over there.
--HG--
branch : /minor-doc-fix-in-skippingtxt-also-submi-1387492852421
2013-12-19 22:41:07 +00:00
holger krekel 49b9f9091a Merge pull request #9 from lukaszb/mark-error-message
Updated error message to be more helpful.
2013-12-19 07:13:13 -08:00
Lukasz Balcerzak 99277be25f Updated error message to be more helpful
Also, added misssing test
2013-12-19 14:29:57 +01:00
holger krekel 699892bd03 fix issue409 -- better interoperate with cx_freeze by not
trying to import from collections.abc which causes problems for py27/cx_freeze.
2013-12-18 14:56:45 +01:00
Bruno Oliveira 70c1503afc updated plugins_index for pytest 2.5.1 release 2013-12-17 21:52:26 -02:00
Bruno Oliveira ee5d2eb696 plugins_index.py and test run under py33
changed a message a bit since issue405 has actually been resolved
2013-12-17 21:42:51 -02:00
Bruno Oliveira 2058f11931 Formatted plugins_index files to use a 80 char width
- Formatted code to follow pep-8 more closely;
- Got rid of header comments to better follow py.test coding style;
2013-12-17 19:34:07 -02:00
Bruno Oliveira 53a9ee21d4 Fixed test_plugins_index to work on python 2.6
- Expected and obtained modules now use .rst to avoid being picked as doctests
- Fixed test_plugins_index.expected to use the real py.test version
2013-12-17 19:14:57 -02:00
holger krekel 04118a5761 just use "sans-serif" as the default font, thankfully recommended by hynek. 2013-12-17 14:59:29 +01:00
holger krekel c101c30690 change to the non-serif version of "Deja Vu" 2013-12-17 13:48:59 +01:00
holger krekel 0e664d3471 don't use guidea as font as it appears to give troubles to windows/chrome
users, see also here: http://stackoverflow.com/questions/11487427/is-there-any-font-smoothing-in-google-chrome
2013-12-17 13:21:39 +01:00
holger krekel fcb1749f10 a few minor fixes and removing google+ stuff. 2013-12-17 11:24:58 +01:00
holger krekel 180eb098f1 Added tag 2.5.1 for changeset 039d543d1ca0 2013-12-17 10:52:03 +01:00
holger krekel cc9b3ec296 fix links and add github link 2013-12-17 08:59:50 +01:00
holger krekel 66bd71a5d7 use gudea/gudea as header/body fonts 2013-12-17 08:56:59 +01:00
holger krekel 3365907989 last change to release announce 2013-12-17 08:43:01 +01:00
holger krekel 6b2040f98d regen docs for 2.5.1, add links for coverage reports 2013-12-17 08:30:35 +01:00
holger krekel 90551c6ce2 adding a release announcement and some doc fixes 2013-12-17 07:58:49 +01:00
holger krekel d3b8390df3 Merge branch 'doc' of git+ssh://github.com/Turbo87/pytest into Turbo87-doc
Conflicts:
	CHANGELOG
2013-12-17 06:49:12 +01:00
holger krekel 9554fe0bf8 pypy has >21K tests now 2013-12-16 18:25:00 +01:00
holger krekel 5a13f31bce fix issue407: fix addoption docstring to point to argparse instead of
optparse. Thanks Daniel D. Wright.
2013-12-16 18:07:05 +01:00
holger krekel 41bddb48a1 remove unused var (fixes flakes tests) 2013-12-16 12:38:15 +01:00
Floris Bruynooghe b820cf2e39 Fix docstring
This was copied from another paramterize call and I forgot to change
the parameters referred too.
2013-12-16 10:51:50 +00:00
Floris Bruynooghe fd8638652d Still print this, but use py2/py3 compat syntax
I realised being able to print is probably an essential part of this
test which I may have inadvertendly disabled, so correct that.
2013-12-16 10:51:04 +00:00
holger krekel 01ae5dbb2e amend CHANGELOG with credits and issue mentioning 2013-12-16 08:04:46 +01:00
holger krekel b4797d6295 fix issue403 : allow same-name parametrized functions within a collector 2013-12-16 07:47:59 +01:00
holger krekel c9195a0f45 fix py32 failures and remove random print from commit accident 2013-12-16 07:19:49 +01:00