11.5.4 (2018-06-27) 2================== 3 4- fix pytest-dev/pytest#3451: don't make assumptions about fs case sensitivity 5 in ``make_numbered_dir``. 6 71.5.3 8===== 9 10- fix #179: ensure we can support 'from py.error import ...' 11 121.5.2 13===== 14 15- fix #169, #170: error importing py.log on Windows: no module named ``syslog``. 16 171.5.1 18===== 19 20- fix #167 - prevent pip from installing py in unsupported Python versions. 21 221.5.0 23===== 24 25NOTE: **this release has been removed from PyPI** due to missing package 26metadata which caused a number of problems to py26 and py33 users. 27This issue was fixed in the 1.5.1 release. 28 29- python 2.6 and 3.3 are no longer supported 30- deprecate py.std and remove all internal uses 31- fix #73 turn py.error into an actual module 32- path join to / no longer produces leading double slashes 33- fix #82 - remove unsupportable aliases 34- fix python37 compatibility of path.sysfind on windows by correctly replacing vars 35- turn iniconfig and apipkg into vendored packages and ease de-vendoring for distributions 36- fix #68 remove invalid py.test.ensuretemp references 37- fix #25 - deprecate path.listdir(sort=callable) 38- add ``TerminalWriter.chars_on_current_line`` read-only property that tracks how many characters 39 have been written to the current line. 40 411.4.34 42==================================================================== 43 44- fix issue119 / pytest issue708 where tmpdir may fail to make numbered directories 45 when the filesystem is case-insensitive. 46 471.4.33 48==================================================================== 49 50- avoid imports in calls to py.path.local().fnmatch(). Thanks Andreas Pelme for 51 the PR. 52 53- fix issue106: Naive unicode encoding when calling fspath() in python2. Thanks Tiago Nobrega for the PR. 54 55- fix issue110: unittest.TestCase.assertWarns fails with py imported. 56 571.4.32 58==================================================================== 59 60- fix issue70: added ability to copy all stat info in py.path.local.copy. 61 62- make TerminalWriter.fullwidth a property. This results in the correct 63 value when the terminal gets resized. 64 65- update supported html tags to include recent additions. 66 Thanks Denis Afonso for the PR. 67 68- Remove internal code in ``Source.compile`` meant to support earlier Python 3 versions that produced the side effect 69 of leaving ``None`` in ``sys.modules`` when called (see pytest-dev/pytest#2103). 70 Thanks Bruno Oliveira for the PR. 71 721.4.31 73================================================== 74 75- fix local().copy(dest, mode=True) to also work 76 with unicode. 77 78- pass better error message with svn EEXIST paths 79 801.4.30 81================================================== 82 83- fix issue68 an assert with a multiline list comprehension 84 was not reported correctly. Thanks Henrik Heibuerger. 85 86 871.4.29 88================================================== 89 90- fix issue55: revert a change to the statement finding algorithm 91 which is used by pytest for generating tracebacks. 92 Thanks Daniel Hahler for initial analysis. 93 94- fix pytest issue254 for when traceback rendering can't 95 find valid source code. Thanks Ionel Cristian Maries. 96 97 981.4.28 99================================================== 100 101- fix issue64 -- dirpath regression when "abs=True" is passed. 102 Thanks Gilles Dartiguelongue. 103 1041.4.27 105================================================== 106 107- fix issue59: point to new repo site 108 109- allow a new ensuresyspath="append" mode for py.path.local.pyimport() 110 so that a neccessary import path is appended instead of prepended to 111 sys.path 112 113- strike undocumented, untested argument to py.path.local.pypkgpath 114 115- speed up py.path.local.dirpath by a factor of 10 116 1171.4.26 118================================================== 119 120- avoid calling normpath twice in py.path.local 121 122- py.builtin._reraise properly reraises under Python3 now. 123 124- fix issue53 - remove module index, thanks jenisys. 125 126- allow posix path separators when "fnmatch" is called. 127 Thanks Christian Long for the complete PR. 128 1291.4.25 130================================================== 131 132- fix issue52: vaguely fix py25 compat of py.path.local (it's not 133 officially supported), also fix docs 134 135- fix pytest issue 589: when checking if we have a recursion error 136 check for the specific "maximum recursion depth" text of the exception. 137 1381.4.24 139================================================== 140 141- Fix retrieving source when an else: line has an other statement on 142 the same line. 143 144- add localpath read_text/write_text/read_bytes/write_bytes methods 145 as shortcuts and clearer bytes/text interfaces for read/write. 146 Adapted from a PR from Paul Moore. 147 148 1491.4.23 150================================================== 151 152- use newer apipkg version which makes attribute access on 153 alias modules resolve to None rather than an ImportError. 154 This helps with code that uses inspect.getframeinfo() 155 on py34 which causes a complete walk on sys.modules 156 thus triggering the alias module to resolve and blowing 157 up with ImportError. The negative side is that something 158 like "py.test.X" will now result in None instead of "importerror: pytest" 159 if pytest is not installed. But you shouldn't import "py.test" 160 anyway anymore. 161 162- adapt one svn test to only check for any exception instead 163 of specific ones because different svn versions cause different 164 errors and we don't care. 165 166 1671.4.22 168================================================== 169 170- refactor class-level registry on ForkedFunc child start/finish 171 event to become instance based (i.e. passed into the constructor) 172 1731.4.21 174================================================== 175 176- ForkedFunc now has class-level register_on_start/on_exit() 177 methods to allow adding information in the boxed process. 178 Thanks Marc Schlaich. 179 180- ForkedFunc in the child opens in "auto-flush" mode for 181 stdout/stderr so that when a subprocess dies you can see 182 its output even if it didn't flush itself. 183 184- refactor traceback generation in light of pytest issue 364 185 (shortening tracebacks). you can now set a new traceback style 186 on a per-entry basis such that a caller can force entries to be 187 isplayed as short or long entries. 188 189- win32: py.path.local.sysfind(name) will preferrably return files with 190 extensions so that if "X" and "X.bat" or "X.exe" is on the PATH, 191 one of the latter two will be returned. 192 1931.4.20 194================================================== 195 196- ignore unicode decode errors in xmlescape. Thanks Anatoly Bubenkoff. 197 198- on python2 modify traceback.format_exception_only to match python3 199 behaviour, namely trying to print unicode for Exception instances 200 201- use a safer way for serializing exception reports (helps to fix 202 pytest issue413) 203 204Changes between 1.4.18 and 1.4.19 205================================================== 206 207- merge in apipkg fixes 208 209- some micro-optimizations in py/_code/code.py for speeding 210 up pytest runs. Thanks Alex Gaynor for initiative. 211 212- check PY_COLORS=1 or PY_COLORS=0 to force coloring/not-coloring 213 for py.io.TerminalWriter() independently from capabilities 214 of the output file. Thanks Marc Abramowitz for the PR. 215 216- some fixes to unicode handling in assertion handling. 217 Thanks for the PR to Floris Bruynooghe. (This helps 218 to fix pytest issue 319). 219 220- depend on setuptools presence, remove distribute_setup 221 222Changes between 1.4.17 and 1.4.18 223================================================== 224 225- introduce path.ensure_dir() as a synonym for ensure(..., dir=1) 226 227- some unicode/python3 related fixes wrt to path manipulations 228 (if you start passing unicode particular in py2 you might 229 still get problems, though) 230 231Changes between 1.4.16 and 1.4.17 232================================================== 233 234- make py.io.TerminalWriter() prefer colorama if it is available 235 and avoid empty lines when separator-lines are printed by 236 being defensive and reducing the working terminalwidth by 1 237 238- introduce optional "expanduser" argument to py.path.local 239 to that local("~", expanduser=True) gives the home 240 directory of "user". 241 242Changes between 1.4.15 and 1.4.16 243================================================== 244 245- fix issue35 - define __gt__ ordering between a local path 246 and strings 247 248- fix issue36 - make chdir() work even if os.getcwd() fails. 249 250- add path.exists/isdir/isfile/islink shortcuts 251 252- introduce local path.as_cwd() context manager. 253 254- introduce p.write(ensure=1) and p.open(ensure=1) 255 where ensure triggers creation of neccessary parent 256 dirs. 257 258 259Changes between 1.4.14 and 1.4.15 260================================================== 261 262- majorly speed up some common calling patterns with 263 LocalPath.listdir()/join/check/stat functions considerably. 264 265- fix an edge case with fnmatch where a glob style pattern appeared 266 in an absolute path. 267 268Changes between 1.4.13 and 1.4.14 269================================================== 270 271- fix dupfile to work with files that don't 272 carry a mode. Thanks Jason R. Coombs. 273 274Changes between 1.4.12 and 1.4.13 275================================================== 276 277- fix getting statementrange/compiling a file ending 278 in a comment line without newline (on python2.5) 279- for local paths you can pass "mode=True" to a copy() 280 in order to copy permission bits (underlying mechanism 281 is using shutil.copymode) 282- add paths arguments to py.path.local.sysfind to restrict 283 search to the diretories in the path. 284- add isdir/isfile/islink to path.stat() objects allowing to perform 285 multiple checks without calling out multiple times 286- drop py.path.local.__new__ in favour of a simpler __init__ 287- iniconfig: allow "name:value" settings in config files, no space after 288 "name" required 289- fix issue 27 - NameError in unlikely untested case of saferepr 290 291 292Changes between 1.4.11 and 1.4.12 293================================================== 294 295- fix python2.4 support - for pre-AST interpreters re-introduce 296 old way to find statements in exceptions (closes pytest issue 209) 297- add tox.ini to distribution 298- fix issue23 - print *,** args information in tracebacks, 299 thanks Manuel Jacob 300 301 302Changes between 1.4.10 and 1.4.11 303================================================== 304 305- use _ast to determine statement ranges when printing tracebacks - 306 avoiding multi-second delays on some large test modules 307- fix an internal test to not use class-denoted pytest_funcarg__ 308- fix a doc link to bug tracker 309- try to make terminal.write() printing more robust against 310 unicodeencode/decode problems, amend according test 311- introduce py.builtin.text and py.builtin.bytes 312 to point to respective str/unicode (py2) and bytes/str (py3) types 313- fix error handling on win32/py33 for ENODIR 314 315Changes between 1.4.9 and 1.4.10 316================================================== 317 318- terminalwriter: default to encode to UTF8 if no encoding is defined 319 on the output stream 320- issue22: improve heuristic for finding the statementrange in exceptions 321 322Changes between 1.4.8 and 1.4.9 323================================================== 324 325- fix bug of path.visit() which would not recognize glob-style patterns 326 for the "rec" recursion argument 327- changed iniconfig parsing to better conform, now the chars ";" 328 and "#" only mark a comment at the stripped start of a line 329- include recent apipkg-1.2 330- change internal terminalwriter.line/reline logic to more nicely 331 support file spinners 332 333Changes between 1.4.7 and 1.4.8 334================================================== 335 336- fix issue 13 - correct handling of the tag name object in xmlgen 337- fix issue 14 - support raw attribute values in xmlgen 338- fix windows terminalwriter printing/re-line problem 339- update distribute_setup.py to 0.6.27 340 341Changes between 1.4.6 and 1.4.7 342================================================== 343 344- fix issue11 - own test failure with python3.3 / Thanks Benjamin Peterson 345- help fix pytest issue 102 346 347Changes between 1.4.5 and 1.4.6 348================================================== 349 350- help to fix pytest issue99: unify output of 351 ExceptionInfo.getrepr(style="native") with ...(style="long") 352- fix issue7: source.getstatementrange() now raises proper error 353 if no valid statement can be found 354- fix issue8: fix code and tests of svnurl/svnwc to work on subversion 1.7 - 355 note that path.status(updates=1) will not properly work svn-17's status 356 --xml output is broken. 357- make source.getstatementrange() more resilent about non-python code frames 358 (as seen from jnja2) 359- make trackeback recursion detection more resilent 360 about the eval magic of a decorator library 361- iniconfig: add support for ; as comment starter 362- properly handle lists in xmlgen on python3 363- normalize py.code.getfslineno(obj) to always return a (string, int) tuple 364 defaulting to ("", -1) respectively if no source code can be found for obj. 365 366Changes between 1.4.4 and 1.4.5 367================================================== 368 369- improve some unicode handling in terminalwriter and capturing 370 (used by pytest) 371 372Changes between 1.4.3 and 1.4.4 373================================================== 374 375- a few fixes and assertion related refinements for pytest-2.1 376- guard py.code.Code and getfslineno against bogus input 377 and make py.code.Code objects for object instance 378 by looking up their __call__ function. 379- make exception presentation robust against invalid current cwd 380 381Changes between 1.4.2 and 1.4.3 382================================================== 383 384- fix terminal coloring issue for skipped tests (thanks Amaury) 385- fix issue4 - large calls to ansi_print (thanks Amaury) 386 387Changes between 1.4.1 and 1.4.2 388================================================== 389 390- fix (pytest) issue23 - tmpdir argument now works on Python3.2 and WindowsXP 391 (which apparently starts to offer os.symlink now) 392 393- better error message for syntax errors from compiled code 394 395- small fix to better deal with (un-)colored terminal output on windows 396 397Changes between 1.4.0 and 1.4.1 398================================================== 399 400- fix issue1 - py.error.* classes to be pickleable 401 402- fix issue2 - on windows32 use PATHEXT as the list of potential 403 extensions to find find binaries with py.path.local.sysfind(commandname) 404 405- fix (pytest-) issue10 and refine assertion reinterpretation 406 to avoid breaking if the __nonzero__ of an object fails 407 408- fix (pytest-) issue17 where python3 does not like "import *" 409 leading to misrepresentation of import-errors in test modules 410 411- fix py.error.* attribute pypy access issue 412 413- allow path.samefile(arg) to succeed when arg is a relative filename 414 415- fix (pytest-) issue20 path.samefile(relpath) works as expected now 416 417- fix (pytest-) issue8 len(long_list) now shows the lenght of the list 418 419Changes between 1.3.4 and 1.4.0 420================================================== 421 422- py.test was moved to a separate "pytest" package. What remains is 423 a stub hook which will proxy ``import py.test`` to ``pytest``. 424- all command line tools ("py.cleanup/lookup/countloc/..." moved 425 to "pycmd" package) 426- removed the old and deprecated "py.magic" namespace 427- use apipkg-1.1 and make py.apipkg.initpkg|ApiModule available 428- add py.iniconfig module for brain-dead easy ini-config file parsing 429- introduce py.builtin.any() 430- path objects have a .dirname attribute now (equivalent to 431 os.path.dirname(path)) 432- path.visit() accepts breadthfirst (bf) and sort options 433- remove deprecated py.compat namespace 434 435Changes between 1.3.3 and 1.3.4 436================================================== 437 438- fix issue111: improve install documentation for windows 439- fix issue119: fix custom collectability of __init__.py as a module 440- fix issue116: --doctestmodules work with __init__.py files as well 441- fix issue115: unify internal exception passthrough/catching/GeneratorExit 442- fix issue118: new --tb=native for presenting cpython-standard exceptions 443 444Changes between 1.3.2 and 1.3.3 445================================================== 446 447- fix issue113: assertion representation problem with triple-quoted strings 448 (and possibly other cases) 449- make conftest loading detect that a conftest file with the same 450 content was already loaded, avoids surprises in nested directory structures 451 which can be produced e.g. by Hudson. It probably removes the need to use 452 --confcutdir in most cases. 453- fix terminal coloring for win32 454 (thanks Michael Foord for reporting) 455- fix weirdness: make terminal width detection work on stdout instead of stdin 456 (thanks Armin Ronacher for reporting) 457- remove trailing whitespace in all py/text distribution files 458 459Changes between 1.3.1 and 1.3.2 460================================================== 461 462New features 463++++++++++++++++++ 464 465- fix issue103: introduce py.test.raises as context manager, examples:: 466 467 with py.test.raises(ZeroDivisionError): 468 x = 0 469 1 / x 470 471 with py.test.raises(RuntimeError) as excinfo: 472 call_something() 473 474 # you may do extra checks on excinfo.value|type|traceback here 475 476 (thanks Ronny Pfannschmidt) 477 478- Funcarg factories can now dynamically apply a marker to a 479 test invocation. This is for example useful if a factory 480 provides parameters to a test which are expected-to-fail:: 481 482 def pytest_funcarg__arg(request): 483 request.applymarker(py.test.mark.xfail(reason="flaky config")) 484 ... 485 486 def test_function(arg): 487 ... 488 489- improved error reporting on collection and import errors. This makes 490 use of a more general mechanism, namely that for custom test item/collect 491 nodes ``node.repr_failure(excinfo)`` is now uniformly called so that you can 492 override it to return a string error representation of your choice 493 which is going to be reported as a (red) string. 494 495- introduce '--junitprefix=STR' option to prepend a prefix 496 to all reports in the junitxml file. 497 498Bug fixes / Maintenance 499++++++++++++++++++++++++++ 500 501- make tests and the ``pytest_recwarn`` plugin in particular fully compatible 502 to Python2.7 (if you use the ``recwarn`` funcarg warnings will be enabled so that 503 you can properly check for their existence in a cross-python manner). 504- refine --pdb: ignore xfailed tests, unify its TB-reporting and 505 don't display failures again at the end. 506- fix assertion interpretation with the ** operator (thanks Benjamin Peterson) 507- fix issue105 assignment on the same line as a failing assertion (thanks Benjamin Peterson) 508- fix issue104 proper escaping for test names in junitxml plugin (thanks anonymous) 509- fix issue57 -f|--looponfail to work with xpassing tests (thanks Ronny) 510- fix issue92 collectonly reporter and --pastebin (thanks Benjamin Peterson) 511- fix py.code.compile(source) to generate unique filenames 512- fix assertion re-interp problems on PyPy, by defering code 513 compilation to the (overridable) Frame.eval class. (thanks Amaury Forgeot) 514- fix py.path.local.pyimport() to work with directories 515- streamline py.path.local.mkdtemp implementation and usage 516- don't print empty lines when showing junitxml-filename 517- add optional boolean ignore_errors parameter to py.path.local.remove 518- fix terminal writing on win32/python2.4 519- py.process.cmdexec() now tries harder to return properly encoded unicode objects 520 on all python versions 521- install plain py.test/py.which scripts also for Jython, this helps to 522 get canonical script paths in virtualenv situations 523- make path.bestrelpath(path) return ".", note that when calling 524 X.bestrelpath the assumption is that X is a directory. 525- make initial conftest discovery ignore "--" prefixed arguments 526- fix resultlog plugin when used in an multicpu/multihost xdist situation 527 (thanks Jakub Gustak) 528- perform distributed testing related reporting in the xdist-plugin 529 rather than having dist-related code in the generic py.test 530 distribution 531- fix homedir detection on Windows 532- ship distribute_setup.py version 0.6.13 533 534Changes between 1.3.0 and 1.3.1 535================================================== 536 537New features 538++++++++++++++++++ 539 540- issue91: introduce new py.test.xfail(reason) helper 541 to imperatively mark a test as expected to fail. Can 542 be used from within setup and test functions. This is 543 useful especially for parametrized tests when certain 544 configurations are expected-to-fail. In this case the 545 declarative approach with the @py.test.mark.xfail cannot 546 be used as it would mark all configurations as xfail. 547 548- issue102: introduce new --maxfail=NUM option to stop 549 test runs after NUM failures. This is a generalization 550 of the '-x' or '--exitfirst' option which is now equivalent 551 to '--maxfail=1'. Both '-x' and '--maxfail' will 552 now also print a line near the end indicating the Interruption. 553 554- issue89: allow py.test.mark decorators to be used on classes 555 (class decorators were introduced with python2.6) and 556 also allow to have multiple markers applied at class/module level 557 by specifying a list. 558 559- improve and refine letter reporting in the progress bar: 560 . pass 561 f failed test 562 s skipped tests (reminder: use for dependency/platform mismatch only) 563 x xfailed test (test that was expected to fail) 564 X xpassed test (test that was expected to fail but passed) 565 566 You can use any combination of 'fsxX' with the '-r' extended 567 reporting option. The xfail/xpass results will show up as 568 skipped tests in the junitxml output - which also fixes 569 issue99. 570 571- make py.test.cmdline.main() return the exitstatus instead of raising 572 SystemExit and also allow it to be called multiple times. This of 573 course requires that your application and tests are properly teared 574 down and don't have global state. 575 576Fixes / Maintenance 577++++++++++++++++++++++ 578 579- improved traceback presentation: 580 - improved and unified reporting for "--tb=short" option 581 - Errors during test module imports are much shorter, (using --tb=short style) 582 - raises shows shorter more relevant tracebacks 583 - --fulltrace now more systematically makes traces longer / inhibits cutting 584 585- improve support for raises and other dynamically compiled code by 586 manipulating python's linecache.cache instead of the previous 587 rather hacky way of creating custom code objects. This makes 588 it seemlessly work on Jython and PyPy where it previously didn't. 589 590- fix issue96: make capturing more resilient against Control-C 591 interruptions (involved somewhat substantial refactoring 592 to the underlying capturing functionality to avoid race 593 conditions). 594 595- fix chaining of conditional skipif/xfail decorators - so it works now 596 as expected to use multiple @py.test.mark.skipif(condition) decorators, 597 including specific reporting which of the conditions lead to skipping. 598 599- fix issue95: late-import zlib so that it's not required 600 for general py.test startup. 601 602- fix issue94: make reporting more robust against bogus source code 603 (and internally be more careful when presenting unexpected byte sequences) 604 605 606Changes between 1.2.1 and 1.3.0 607================================================== 608 609- deprecate --report option in favour of a new shorter and easier to 610 remember -r option: it takes a string argument consisting of any 611 combination of 'xfsX' characters. They relate to the single chars 612 you see during the dotted progress printing and will print an extra line 613 per test at the end of the test run. This extra line indicates the exact 614 position or test ID that you directly paste to the py.test cmdline in order 615 to re-run a particular test. 616 617- allow external plugins to register new hooks via the new 618 pytest_addhooks(pluginmanager) hook. The new release of 619 the pytest-xdist plugin for distributed and looponfailing 620 testing requires this feature. 621 622- add a new pytest_ignore_collect(path, config) hook to allow projects and 623 plugins to define exclusion behaviour for their directory structure - 624 for example you may define in a conftest.py this method:: 625 626 def pytest_ignore_collect(path): 627 return path.check(link=1) 628 629 to prevent even a collection try of any tests in symlinked dirs. 630 631- new pytest_pycollect_makemodule(path, parent) hook for 632 allowing customization of the Module collection object for a 633 matching test module. 634 635- extend and refine xfail mechanism: 636 ``@py.test.mark.xfail(run=False)`` do not run the decorated test 637 ``@py.test.mark.xfail(reason="...")`` prints the reason string in xfail summaries 638 specifiying ``--runxfail`` on command line virtually ignores xfail markers 639 640- expose (previously internal) commonly useful methods: 641 py.io.get_terminal_with() -> return terminal width 642 py.io.ansi_print(...) -> print colored/bold text on linux/win32 643 py.io.saferepr(obj) -> return limited representation string 644 645- expose test outcome related exceptions as py.test.skip.Exception, 646 py.test.raises.Exception etc., useful mostly for plugins 647 doing special outcome interpretation/tweaking 648 649- (issue85) fix junitxml plugin to handle tests with non-ascii output 650 651- fix/refine python3 compatibility (thanks Benjamin Peterson) 652 653- fixes for making the jython/win32 combination work, note however: 654 jython2.5.1/win32 does not provide a command line launcher, see 655 http://bugs.jython.org/issue1491 . See pylib install documentation 656 for how to work around. 657 658- fixes for handling of unicode exception values and unprintable objects 659 660- (issue87) fix unboundlocal error in assertionold code 661 662- (issue86) improve documentation for looponfailing 663 664- refine IO capturing: stdin-redirect pseudo-file now has a NOP close() method 665 666- ship distribute_setup.py version 0.6.10 667 668- added links to the new capturelog and coverage plugins 669 670 671Changes between 1.2.1 and 1.2.0 672===================================== 673 674- refined usage and options for "py.cleanup":: 675 676 py.cleanup # remove "*.pyc" and "*$py.class" (jython) files 677 py.cleanup -e .swp -e .cache # also remove files with these extensions 678 py.cleanup -s # remove "build" and "dist" directory next to setup.py files 679 py.cleanup -d # also remove empty directories 680 py.cleanup -a # synonym for "-s -d -e 'pip-log.txt'" 681 py.cleanup -n # dry run, only show what would be removed 682 683- add a new option "py.test --funcargs" which shows available funcargs 684 and their help strings (docstrings on their respective factory function) 685 for a given test path 686 687- display a short and concise traceback if a funcarg lookup fails 688 689- early-load "conftest.py" files in non-dot first-level sub directories. 690 allows to conveniently keep and access test-related options in a ``test`` 691 subdir and still add command line options. 692 693- fix issue67: new super-short traceback-printing option: "--tb=line" will print a single line for each failing (python) test indicating its filename, lineno and the failure value 694 695- fix issue78: always call python-level teardown functions even if the 696 according setup failed. This includes refinements for calling setup_module/class functions 697 which will now only be called once instead of the previous behaviour where they'd be called 698 multiple times if they raise an exception (including a Skipped exception). Any exception 699 will be re-corded and associated with all tests in the according module/class scope. 700 701- fix issue63: assume <40 columns to be a bogus terminal width, default to 80 702 703- fix pdb debugging to be in the correct frame on raises-related errors 704 705- update apipkg.py to fix an issue where recursive imports might 706 unnecessarily break importing 707 708- fix plugin links 709 710Changes between 1.2 and 1.1.1 711===================================== 712 713- moved dist/looponfailing from py.test core into a new 714 separately released pytest-xdist plugin. 715 716- new junitxml plugin: --junitxml=path will generate a junit style xml file 717 which is processable e.g. by the Hudson CI system. 718 719- new option: --genscript=path will generate a standalone py.test script 720 which will not need any libraries installed. thanks to Ralf Schmitt. 721 722- new option: --ignore will prevent specified path from collection. 723 Can be specified multiple times. 724 725- new option: --confcutdir=dir will make py.test only consider conftest 726 files that are relative to the specified dir. 727 728- new funcarg: "pytestconfig" is the pytest config object for access 729 to command line args and can now be easily used in a test. 730 731- install 'py.test' and `py.which` with a ``-$VERSION`` suffix to 732 disambiguate between Python3, python2.X, Jython and PyPy installed versions. 733 734- new "pytestconfig" funcarg allows access to test config object 735 736- new "pytest_report_header" hook can return additional lines 737 to be displayed at the header of a test run. 738 739- (experimental) allow "py.test path::name1::name2::..." for pointing 740 to a test within a test collection directly. This might eventually 741 evolve as a full substitute to "-k" specifications. 742 743- streamlined plugin loading: order is now as documented in 744 customize.html: setuptools, ENV, commandline, conftest. 745 also setuptools entry point names are turned to canonical namees ("pytest_*") 746 747- automatically skip tests that need 'capfd' but have no os.dup 748 749- allow pytest_generate_tests to be defined in classes as well 750 751- deprecate usage of 'disabled' attribute in favour of pytestmark 752- deprecate definition of Directory, Module, Class and Function nodes 753 in conftest.py files. Use pytest collect hooks instead. 754 755- collection/item node specific runtest/collect hooks are only called exactly 756 on matching conftest.py files, i.e. ones which are exactly below 757 the filesystem path of an item 758 759- change: the first pytest_collect_directory hook to return something 760 will now prevent further hooks to be called. 761 762- change: figleaf plugin now requires --figleaf to run. Also 763 change its long command line options to be a bit shorter (see py.test -h). 764 765- change: pytest doctest plugin is now enabled by default and has a 766 new option --doctest-glob to set a pattern for file matches. 767 768- change: remove internal py._* helper vars, only keep py._pydir 769 770- robustify capturing to survive if custom pytest_runtest_setup 771 code failed and prevented the capturing setup code from running. 772 773- make py.test.* helpers provided by default plugins visible early - 774 works transparently both for pydoc and for interactive sessions 775 which will regularly see e.g. py.test.mark and py.test.importorskip. 776 777- simplify internal plugin manager machinery 778- simplify internal collection tree by introducing a RootCollector node 779 780- fix assert reinterpreation that sees a call containing "keyword=..." 781 782- fix issue66: invoke pytest_sessionstart and pytest_sessionfinish 783 hooks on slaves during dist-testing, report module/session teardown 784 hooks correctly. 785 786- fix issue65: properly handle dist-testing if no 787 execnet/py lib installed remotely. 788 789- skip some install-tests if no execnet is available 790 791- fix docs, fix internal bin/ script generation 792 793 794Changes between 1.1.1 and 1.1.0 795===================================== 796 797- introduce automatic plugin registration via 'pytest11' 798 entrypoints via setuptools' pkg_resources.iter_entry_points 799 800- fix py.test dist-testing to work with execnet >= 1.0.0b4 801 802- re-introduce py.test.cmdline.main() for better backward compatibility 803 804- svn paths: fix a bug with path.check(versioned=True) for svn paths, 805 allow '%' in svn paths, make svnwc.update() default to interactive mode 806 like in 1.0.x and add svnwc.update(interactive=False) to inhibit interaction. 807 808- refine distributed tarball to contain test and no pyc files 809 810- try harder to have deprecation warnings for py.compat.* accesses 811 report a correct location 812 813Changes between 1.1.0 and 1.0.2 814===================================== 815 816* adjust and improve docs 817 818* remove py.rest tool and internal namespace - it was 819 never really advertised and can still be used with 820 the old release if needed. If there is interest 821 it could be revived into its own tool i guess. 822 823* fix issue48 and issue59: raise an Error if the module 824 from an imported test file does not seem to come from 825 the filepath - avoids "same-name" confusion that has 826 been reported repeatedly 827 828* merged Ronny's nose-compatibility hacks: now 829 nose-style setup_module() and setup() functions are 830 supported 831 832* introduce generalized py.test.mark function marking 833 834* reshuffle / refine command line grouping 835 836* deprecate parser.addgroup in favour of getgroup which creates option group 837 838* add --report command line option that allows to control showing of skipped/xfailed sections 839 840* generalized skipping: a new way to mark python functions with skipif or xfail 841 at function, class and modules level based on platform or sys-module attributes. 842 843* extend py.test.mark decorator to allow for positional args 844 845* introduce and test "py.cleanup -d" to remove empty directories 846 847* fix issue #59 - robustify unittest test collection 848 849* make bpython/help interaction work by adding an __all__ attribute 850 to ApiModule, cleanup initpkg 851 852* use MIT license for pylib, add some contributors 853 854* remove py.execnet code and substitute all usages with 'execnet' proper 855 856* fix issue50 - cached_setup now caches more to expectations 857 for test functions with multiple arguments. 858 859* merge Jarko's fixes, issue #45 and #46 860 861* add the ability to specify a path for py.lookup to search in 862 863* fix a funcarg cached_setup bug probably only occuring 864 in distributed testing and "module" scope with teardown. 865 866* many fixes and changes for making the code base python3 compatible, 867 many thanks to Benjamin Peterson for helping with this. 868 869* consolidate builtins implementation to be compatible with >=2.3, 870 add helpers to ease keeping 2 and 3k compatible code 871 872* deprecate py.compat.doctest|subprocess|textwrap|optparse 873 874* deprecate py.magic.autopath, remove py/magic directory 875 876* move pytest assertion handling to py/code and a pytest_assertion 877 plugin, add "--no-assert" option, deprecate py.magic namespaces 878 in favour of (less) py.code ones. 879 880* consolidate and cleanup py/code classes and files 881 882* cleanup py/misc, move tests to bin-for-dist 883 884* introduce delattr/delitem/delenv methods to py.test's monkeypatch funcarg 885 886* consolidate py.log implementation, remove old approach. 887 888* introduce py.io.TextIO and py.io.BytesIO for distinguishing between 889 text/unicode and byte-streams (uses underlying standard lib io.* 890 if available) 891 892* make py.unittest_convert helper script available which converts "unittest.py" 893 style files into the simpler assert/direct-test-classes py.test/nosetests 894 style. The script was written by Laura Creighton. 895 896* simplified internal localpath implementation 897 898Changes between 1.0.1 and 1.0.2 899===================================== 900 901* fixing packaging issues, triggered by fedora redhat packaging, 902 also added doc, examples and contrib dirs to the tarball. 903 904* added a documentation link to the new django plugin. 905 906Changes between 1.0.0 and 1.0.1 907===================================== 908 909* added a 'pytest_nose' plugin which handles nose.SkipTest, 910 nose-style function/method/generator setup/teardown and 911 tries to report functions correctly. 912 913* capturing of unicode writes or encoded strings to sys.stdout/err 914 work better, also terminalwriting was adapted and somewhat 915 unified between windows and linux. 916 917* improved documentation layout and content a lot 918 919* added a "--help-config" option to show conftest.py / ENV-var names for 920 all longopt cmdline options, and some special conftest.py variables. 921 renamed 'conf_capture' conftest setting to 'option_capture' accordingly. 922 923* fix issue #27: better reporting on non-collectable items given on commandline 924 (e.g. pyc files) 925 926* fix issue #33: added --version flag (thanks Benjamin Peterson) 927 928* fix issue #32: adding support for "incomplete" paths to wcpath.status() 929 930* "Test" prefixed classes are *not* collected by default anymore if they 931 have an __init__ method 932 933* monkeypatch setenv() now accepts a "prepend" parameter 934 935* improved reporting of collection error tracebacks 936 937* simplified multicall mechanism and plugin architecture, 938 renamed some internal methods and argnames 939 940Changes between 1.0.0b9 and 1.0.0 941===================================== 942 943* more terse reporting try to show filesystem path relatively to current dir 944* improve xfail output a bit 945 946Changes between 1.0.0b8 and 1.0.0b9 947===================================== 948 949* cleanly handle and report final teardown of test setup 950 951* fix svn-1.6 compat issue with py.path.svnwc().versioned() 952 (thanks Wouter Vanden Hove) 953 954* setup/teardown or collection problems now show as ERRORs 955 or with big "E"'s in the progress lines. they are reported 956 and counted separately. 957 958* dist-testing: properly handle test items that get locally 959 collected but cannot be collected on the remote side - often 960 due to platform/dependency reasons 961 962* simplified py.test.mark API - see keyword plugin documentation 963 964* integrate better with logging: capturing now by default captures 965 test functions and their immediate setup/teardown in a single stream 966 967* capsys and capfd funcargs now have a readouterr() and a close() method 968 (underlyingly py.io.StdCapture/FD objects are used which grew a 969 readouterr() method as well to return snapshots of captured out/err) 970 971* make assert-reinterpretation work better with comparisons not 972 returning bools (reported with numpy from thanks maciej fijalkowski) 973 974* reworked per-test output capturing into the pytest_iocapture.py plugin 975 and thus removed capturing code from config object 976 977* item.repr_failure(excinfo) instead of item.repr_failure(excinfo, outerr) 978 979 980Changes between 1.0.0b7 and 1.0.0b8 981===================================== 982 983* pytest_unittest-plugin is now enabled by default 984 985* introduced pytest_keyboardinterrupt hook and 986 refined pytest_sessionfinish hooked, added tests. 987 988* workaround a buggy logging module interaction ("closing already closed 989 files"). Thanks to Sridhar Ratnakumar for triggering. 990 991* if plugins use "py.test.importorskip" for importing 992 a dependency only a warning will be issued instead 993 of exiting the testing process. 994 995* many improvements to docs: 996 - refined funcargs doc , use the term "factory" instead of "provider" 997 - added a new talk/tutorial doc page 998 - better download page 999 - better plugin docstrings 1000 - added new plugins page and automatic doc generation script 1001 1002* fixed teardown problem related to partially failing funcarg setups 1003 (thanks MrTopf for reporting), "pytest_runtest_teardown" is now 1004 always invoked even if the "pytest_runtest_setup" failed. 1005 1006* tweaked doctest output for docstrings in py modules, 1007 thanks Radomir. 1008 1009Changes between 1.0.0b3 and 1.0.0b7 1010============================================= 1011 1012* renamed py.test.xfail back to py.test.mark.xfail to avoid 1013 two ways to decorate for xfail 1014 1015* re-added py.test.mark decorator for setting keywords on functions 1016 (it was actually documented so removing it was not nice) 1017 1018* remove scope-argument from request.addfinalizer() because 1019 request.cached_setup has the scope arg. TOOWTDI. 1020 1021* perform setup finalization before reporting failures 1022 1023* apply modified patches from Andreas Kloeckner to allow 1024 test functions to have no func_code (#22) and to make 1025 "-k" and function keywords work (#20) 1026 1027* apply patch from Daniel Peolzleithner (issue #23) 1028 1029* resolve issue #18, multiprocessing.Manager() and 1030 redirection clash 1031 1032* make __name__ == "__channelexec__" for remote_exec code 1033 1034Changes between 1.0.0b1 and 1.0.0b3 1035============================================= 1036 1037* plugin classes are removed: one now defines 1038 hooks directly in conftest.py or global pytest_*.py 1039 files. 1040 1041* added new pytest_namespace(config) hook that allows 1042 to inject helpers directly to the py.test.* namespace. 1043 1044* documented and refined many hooks 1045 1046* added new style of generative tests via 1047 pytest_generate_tests hook that integrates 1048 well with function arguments. 1049 1050 1051Changes between 0.9.2 and 1.0.0b1 1052============================================= 1053 1054* introduced new "funcarg" setup method, 1055 see doc/test/funcarg.txt 1056 1057* introduced plugin architecuture and many 1058 new py.test plugins, see 1059 doc/test/plugins.txt 1060 1061* teardown_method is now guaranteed to get 1062 called after a test method has run. 1063 1064* new method: py.test.importorskip(mod,minversion) 1065 will either import or call py.test.skip() 1066 1067* completely revised internal py.test architecture 1068 1069* new py.process.ForkedFunc object allowing to 1070 fork execution of a function to a sub process 1071 and getting a result back. 1072 1073XXX lots of things missing here XXX 1074 1075Changes between 0.9.1 and 0.9.2 1076=============================== 1077 1078* refined installation and metadata, created new setup.py, 1079 now based on setuptools/ez_setup (thanks to Ralf Schmitt 1080 for his support). 1081 1082* improved the way of making py.* scripts available in 1083 windows environments, they are now added to the 1084 Scripts directory as ".cmd" files. 1085 1086* py.path.svnwc.status() now is more complete and 1087 uses xml output from the 'svn' command if available 1088 (Guido Wesdorp) 1089 1090* fix for py.path.svn* to work with svn 1.5 1091 (Chris Lamb) 1092 1093* fix path.relto(otherpath) method on windows to 1094 use normcase for checking if a path is relative. 1095 1096* py.test's traceback is better parseable from editors 1097 (follows the filenames:LINENO: MSG convention) 1098 (thanks to Osmo Salomaa) 1099 1100* fix to javascript-generation, "py.test --runbrowser" 1101 should work more reliably now 1102 1103* removed previously accidentally added 1104 py.test.broken and py.test.notimplemented helpers. 1105 1106* there now is a py.__version__ attribute 1107 1108Changes between 0.9.0 and 0.9.1 1109=============================== 1110 1111This is a fairly complete list of changes between 0.9 and 0.9.1, which can 1112serve as a reference for developers. 1113 1114* allowing + signs in py.path.svn urls [39106] 1115* fixed support for Failed exceptions without excinfo in py.test [39340] 1116* added support for killing processes for Windows (as well as platforms that 1117 support os.kill) in py.misc.killproc [39655] 1118* added setup/teardown for generative tests to py.test [40702] 1119* added detection of FAILED TO LOAD MODULE to py.test [40703, 40738, 40739] 1120* fixed problem with calling .remove() on wcpaths of non-versioned files in 1121 py.path [44248] 1122* fixed some import and inheritance issues in py.test [41480, 44648, 44655] 1123* fail to run greenlet tests when pypy is available, but without stackless 1124 [45294] 1125* small fixes in rsession tests [45295] 1126* fixed issue with 2.5 type representations in py.test [45483, 45484] 1127* made that internal reporting issues displaying is done atomically in py.test 1128 [45518] 1129* made that non-existing files are igored by the py.lookup script [45519] 1130* improved exception name creation in py.test [45535] 1131* made that less threads are used in execnet [merge in 45539] 1132* removed lock required for atomical reporting issue displaying in py.test 1133 [45545] 1134* removed globals from execnet [45541, 45547] 1135* refactored cleanup mechanics, made that setDaemon is set to 1 to make atexit 1136 get called in 2.5 (py.execnet) [45548] 1137* fixed bug in joining threads in py.execnet's servemain [45549] 1138* refactored py.test.rsession tests to not rely on exact output format anymore 1139 [45646] 1140* using repr() on test outcome [45647] 1141* added 'Reason' classes for py.test.skip() [45648, 45649] 1142* killed some unnecessary sanity check in py.test.collect [45655] 1143* avoid using os.tmpfile() in py.io.fdcapture because on Windows it's only 1144 usable by Administrators [45901] 1145* added support for locking and non-recursive commits to py.path.svnwc [45994] 1146* locking files in py.execnet to prevent CPython from segfaulting [46010] 1147* added export() method to py.path.svnurl 1148* fixed -d -x in py.test [47277] 1149* fixed argument concatenation problem in py.path.svnwc [49423] 1150* restore py.test behaviour that it exits with code 1 when there are failures 1151 [49974] 1152* don't fail on html files that don't have an accompanying .txt file [50606] 1153* fixed 'utestconvert.py < input' [50645] 1154* small fix for code indentation in py.code.source [50755] 1155* fix _docgen.py documentation building [51285] 1156* improved checks for source representation of code blocks in py.test [51292] 1157* added support for passing authentication to py.path.svn* objects [52000, 1158 52001] 1159* removed sorted() call for py.apigen tests in favour of [].sort() to support 1160 Python 2.3 [52481] 1161