Commit Graph

62 Commits

Author SHA1 Message Date
Bruno Oliveira 458ecae1df Replace all usages of "pytest_funcarg__" for @pytest.fixture 2016-07-11 22:21:52 -03:00
Ronny Pfannschmidt 8c49561470 split most fixture related code into own plugin 2016-07-09 20:36:00 +02:00
Ronny Pfannschmidt b9a91dc112 merge from master to features 2016-07-06 11:51:48 +02:00
Tom Viner df9918eda3 issue1625, name getfuncargvalue to getfixturevalue 2016-06-24 10:08:19 +02:00
Ronny Pfannschmidt b5bd4d959d merge master to features 2016-06-01 08:13:26 +02:00
Ronny Pfannschmidt d217b52508 fix #510 by adding a describing skip marker on empty parameterize 2016-05-30 14:34:38 +02:00
palaviv 9733127951 pytest_make_parametrize_id receive config object 2016-04-26 10:23:57 +03:00
palaviv b9faf78d51 Added test_pytest_make_parametrize_id 2016-04-25 17:48:28 +03:00
Ceridwen 23a8e2b469 Add .hypothesis to .gitignore and try an older version of Hypothesis for 2.6 2016-04-02 11:47:37 -04:00
Ceridwen 491b30c5d9 Add Hypothesis test for _idval and fix bug it found 2016-04-01 22:45:44 -04:00
Ceridwen 9b438d56e8 Fix a test_unicode_idval_python2 (now test_unicode_idval) and associated string handling on Python 3 2016-04-01 12:27:17 -04:00
palaviv b8c15a0215 improved idmaker name selection in case of duplicate ids 2016-03-23 00:20:58 +02:00
palaviv 4b0237c8ee added test for unique names when recievieng identical ids in parametrize 2016-03-19 21:42:47 +02:00
palaviv 877ca5a0bf added test for None in paramtrized ids list 2016-03-19 21:38:24 +02:00
palaviv a8cfd54871 added test for None in idmaker 2016-03-19 21:23:49 +02:00
Matt Bachmann 8ce32b0795 When a regex pattern contains bytes instead of a string use escape_encode to turn it into a string before further processing. Thanks @nicoddemus for the review and tips! 2016-03-05 21:04:34 -05:00
Bruno Oliveira a912d3745b Moved py.code code over to py.test
Fix #103
2016-01-25 23:18:04 -02:00
Bruno Oliveira b64470443f Fix SystemError when using unicode_escape on Python 3
Fix #1087
2015-09-29 18:20:30 -03:00
Bruno Oliveira 8633c4cefd Fix encoding errors for parametrized tests with unicode parameters in py2
Fix #1085
2015-09-29 17:57:49 -03:00
Bruno Oliveira e1063678f1 escape bytes when creating ids for parametrized values 2015-09-22 23:18:09 -03:00
Michael Droettboom 7f71ce0ab2 Reorganize tests 2015-09-16 16:52:37 -04:00
Michael Droettboom 9a84c9edb6 Add tests for argument formatting 2015-09-16 11:02:48 -04:00
Brianna Laugher b49bedcf0c Merge branch 'master' of git://github.com/Elizaveta239/pytest into Elizaveta239-master 2015-08-28 11:10:22 +10:00
elizabeth e67d66a5d4 Merge branch 'pytest-dev'
# Conflicts:
#	AUTHORS
2015-08-24 22:55:11 +03:00
elizabeth 06585f5bdd Always report error about parametrize data that doesn't correspond to fixtures in test functions. 2015-08-23 13:42:40 +03:00
Bruno Oliveira 729b5e9b2f Merge pull request #923 from The-Compiler/parametrize-idfunc
Generate parametrize IDs for enum/re/class objects.
2015-08-08 15:09:54 -03:00
Brianna Laugher 36b86af4b9 Added more test cases 2015-08-08 19:20:09 +02:00
Brianna Laugher 40fa7b25c5 Merge branch 'master' of git://github.com/Elizaveta239/pytest into Elizaveta239-master
Fixed merge conflict in CHANGELOG
2015-08-08 18:54:53 +02:00
Florian Bruhin b59376bea4 Alert user about other parametrize spellings. 2015-08-07 07:51:59 +02:00
Florian Bruhin 13c5456868 Generate parametrize IDs for enum/re/class objects. 2015-08-07 07:37:59 +02:00
elizabeth 657ca97dbd Some refactorings after code review 2015-08-04 00:02:03 +03:00
elizabeth db9809d6dc Update test for error in 'indirect' parameter 2015-08-02 23:53:44 +03:00
elizabeth 63bac67fb5 Add test for bad value in argument 'indirect' 2015-08-02 23:06:24 +03:00
elizabeth 15b865f502 Rewrite test using @pytest.fixture 2015-08-02 20:30:23 +03:00
elizabeth 2fc7aede0b Request #714: Apply indirect=True on particular argnames 2015-08-02 16:40:40 +03:00
holger krekel 9aec5cd52d use runpytest() instead of runpytest_inprocess if a test can run as subprocess as well
--HG--
branch : testrefactor
2015-04-28 12:05:08 +02:00
holger krekel db5649ec6a streamline pytester API majorly:
- integrate conftest into pytester plugin
- introduce runpytest() to either call runpytest_inline (default) or
  runpytest_subprocess (python -m pytest)
- move testdir.inline_runsource1 to pdb tests
- strike some unneccessary methods.
- a new section "writing plugins" and some better pytester docs

--HG--
branch : testrefactor
2015-04-28 11:54:53 +02:00
holger krekel a8afba054a - refine lsof checking
- make runpytest() create an inline testing process instead of
  a subprocess one

--HG--
branch : testrefactor
2015-04-28 11:54:46 +02:00
holger krekel d3e363b97a - make API between runpytest() and inline_run() more similar
- shift a number of tests to become inline_run() tests

--HG--
branch : testrefactor
2015-04-28 11:54:45 +02:00
holger krekel 424e5d1394 make test suite more tolerable against xdist causing warnings itself (which it does
currently)

--HG--
branch : plugtestfix
2015-04-27 15:06:47 +02:00
Brianna Laugher 43e4fcf6dd Raise specific MarkerError rather than generic ValueError
--HG--
branch : issue463
2015-03-23 20:01:58 +01:00
Brianna Laugher ac17f20d98 #463
Raise a ValueError early if user misspells 'parametrize' as 'parameterize'.

--HG--
branch : issue463
2015-03-21 23:06:25 +01:00
Brianna Laugher 4e35c00ab0 issue351: Add ability to specify parametrize ids as a callable, to generate custom test ids. + tests, docs
--HG--
branch : issue351
2014-04-17 15:08:49 -04:00
holger krekel 41bddb48a1 remove unused var (fixes flakes tests) 2013-12-16 12:38:15 +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 10edfa65dc fix issue396 -- properly sort tests using class-scoped parametrization
also refix issue323 in a better way to avoid recursion for the fixture-grouping
algorithm alltogether.
2013-12-07 20:55:17 +01:00
holger krekel daec4c70b8 refactor sorting wrt class-scopes. This fixes issue396 and also simplifies
the internal sorting algorithm a bit.
2013-12-07 19:31:27 +01:00
holger krekel 4f0879ff9b refactor internal finalization mechanics such that all fixture arguments
in a test invocation will have a corresponding FixtureDef instance.
also fixes issue246 (again).

simplify parametrized fixture teardown by making it work lazy:
during the setup of a parametrized fixture instance any previously
setup instance which was setup with a different param is torn down
before setting up the new one.
2013-12-07 16:37:46 +01:00
holger krekel 8ac5af2896 fix flakes issues and make --flakes run part of tox runs 2013-10-12 15:39:22 +02:00
holger krekel b879074a64 refs issue290 -- move and refactor the test the string/int-id parametrization test (Which xfails) 2013-08-16 11:41:31 +02:00