pytest-2.3: improved fixtures / better unittest integration
=============================================================================
pytest-2.3 comes with many major improvements for fixture/funcarg management
and parametrized testing in Python. It is now easier, more efficient and
more predicatable to re-run the same tests with different fixture
instances. Also, you can directly declare the caching "scope" of
fixtures so that dependent tests throughout your whole test suite can
re-use database or other expensive fixture objects with ease. Lastly,
it's possible for fixture functions (formerly known as funcarg
factories) to use other fixtures, allowing for a completely modular and
re-useable fixture design.
For detailed info and tutorial-style examples, see:
http://pytest.org/latest/fixture.html
Moreover, there is now support for using pytest fixtures/funcargs with
unittest-style suites, see here for examples:
http://pytest.org/latest/unittest.html
Besides, more unittest-test suites are now expected to "simply work"
with pytest.
All changes are backward compatible and you should be able to continue
to run your test suites and 3rd party plugins that worked with
pytest-2.2.4.
If you are interested in the precise reasoning (including examples) of
the pytest-2.3 fixture evolution, please consult
http://pytest.org/latest/funcarg_compare.html
For general info on installation and getting started:
http://pytest.org/latest/getting-started.html
Docs and PDF access as usual at:
http://pytest.org
and more details for those already in the knowing of pytest can be found
in the CHANGELOG below.
Particular thanks for this release go to Floris Bruynooghe, Alex Okrushko
Carl Meyer, Ronny Pfannschmidt, Benjamin Peterson and Alex Gaynor for helping
to get the new features right and well integrated. Ronny and Floris
also helped to fix a number of bugs and yet more people helped by
providing bug reports.
have fun,
holger krekel
Changes between 2.2.4 and 2.3.0
-----------------------------------
- fix issue202 - better automatic names for parametrized test functions
- fix issue139 - introduce @pytest.fixture which allows direct scoping
and parametrization of funcarg factories. Introduce new @pytest.setup
marker to allow the writing of setup functions which accept funcargs.
- fix issue198 - conftest fixtures were not found on windows32 in some
circumstances with nested directory structures due to path manipulation issues
- fix issue193 skip test functions with were parametrized with empty
parameter sets
- fix python3.3 compat, mostly reporting bits that previously depended
on dict ordering
- introduce re-ordering of tests by resource and parametrization setup
which takes precedence to the usual file-ordering
- fix issue185 monkeypatching time.time does not cause pytest to fail
- fix issue172 duplicate call of pytest.setup-decoratored setup_module
functions
- fix junitxml=path construction so that if tests change the
current working directory and the path is a relative path
it is constructed correctly from the original current working dir.
- fix "python setup.py test" example to cause a proper "errno" return
- fix issue165 - fix broken doc links and mention stackoverflow for FAQ
- catch unicode-issues when writing failure representations
to terminal to prevent the whole session from crashing
- fix xfail/skip confusion: a skip-mark or an imperative pytest.skip
will now take precedence before xfail-markers because we
can't determine xfail/xpass status in case of a skip. see also:
http://stackoverflow.com/questions/11105828/in-py-test-when-i-explicitly-sk…
- always report installed 3rd party plugins in the header of a test run
- fix issue160: a failing setup of an xfail-marked tests should
be reported as xfail (not xpass)
- fix issue128: show captured output when capsys/capfd are used
- fix issue179: propperly show the dependency chain of factories
- pluginmanager.register(...) now raises ValueError if the
plugin has been already registered or the name is taken
- fix issue159: improve http://pytest.org/latest/faq.html
especially with respect to the "magic" history, also mention
pytest-django, trial and unittest integration.
- make request.keywords and node.keywords writable. All descendant
collection nodes will see keyword values. Keywords are dictionaries
containing markers and other info.
- fix issue 178: xml binary escapes are now wrapped in py.xml.raw
- fix issue 176: correctly catch the builtin AssertionError
even when we replaced AssertionError with a subclass on the
python level
- factory discovery no longer fails with magic global callables
that provide no sane __code__ object (mock.call for example)
- fix issue 182: testdir.inprocess_run now considers passed plugins
- fix issue 188: ensure sys.exc_info is clear on python2
before calling into a test
- fix issue 191: add unittest TestCase runTest method support
- fix issue 156: monkeypatch correctly handles class level descriptors
- reporting refinements:
- pytest_report_header now receives a "startdir" so that
you can use startdir.bestrelpath(yourpath) to show
nice relative path
- allow plugins to implement both pytest_report_header and
pytest_sessionstart (sessionstart is invoked first).
- don't show deselected reason line if there is none
- py.test -vv will show all of assert comparisations instead of truncating
Hi,
Wingware has released version 4.1.9 of Wing IDE, our integrated development
environment designed specifically for the Python programming language.
Wing IDE provides a professional quality code editor with vi, emacs, and
other
key bindings, auto-completion, call tips, refactoring, context-aware
auto-editing,
a powerful graphical debugger, version control, unit testing, search,
and many
other features. For details see http://wingware.com/
This minor release includes:
Preference to show property values in the debugger (off by default to
avoid calling user code)
Show inherited class attributes in Stack Data and Watch tools
Several VI mode fixes
Several Turbo auto-completer mode fixes
Fix Pretty Print option in the Python Shell and Debug Probe
Fix stepping over and out of Django templates
Fix debugging files with non-ascii characters in their names under
Python 3
Support for debugging 64bit NUKE/NUKEX on Windows and expanded NUKE
How-To
Improve switching documents with Ctrl-Tab
Avoid clipboard confusion caused by some applications on Windows
About 25 other bug fixes and minor improvements
For a complete change log see
http://wingware.com/pub/wingide/4.1.9/CHANGELOG.txt
Free trial: http://wingware.com/wingide/trial
Downloads: http://wingware.com/downloads
Feature matrix: http://wingware.com/wingide/features
More information: http://wingware.com/
Sales: http://wingware.com/store/purchase
Upgrades: https://wingware.com/store/upgrade
Questions? Don't hesitate to email us at sales(a)wingware.com.
Thanks,
--
Stephan Deibel
Wingware | Python IDE
Advancing Software Development
www.wingware.com
I'm pleased to announce the release of pyNVML 3.304: Python Bindings for the NVIDIA Management Library.
pyNVML provides programmatic access to static information and monitoring data for NVIDIA GPUs, as well as management capabilities. It exposes the functionality of the NVML library. See http://developer.nvidia.com/nvidia-management-library-nvml for more information about NVML.
The pyNVML download package and its documentation can be found at:
http://pypi.python.org/pypi/nvidia-ml-py/http://packages.python.org/nvidia-ml-py/
pyNVML is currently used to report GPU information in Ganglia. Check it out at http://developer.nvidia.com/ganglia-monitoring-system
Requires Python 2.5, or an earlier version with the ctypes module. Released under the BSD license.
Download the latest supported driver at http://developer.nvidia.com/cuda/cuda-downloads
Robert Alexander
NVIDIA Tesla Software Engineer
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
I've released v0.3 of pipe_controller (*), my experimental tool to simulate pipes in Python:
https://bitbucket.org/vasudevram/pipe_controller
(*) I had earlier been calling it PipeController, but that is the name of the main class in the package. From now on I'm referring to it as pipe_controller (the Python module name).
Changes in v0.3:
- you can now swap components of a pipe_controller pipe at run time, and it can separately save the results of running the pipe, before and after a component swap, to separate output files; the test program test_pipe_controller_04.py in the download package shows how to do this.
That is, you can do something like this (using UNIX syntax, though pipe_controller is in Python and works differently):
foo | bar | baz # with output going to file 1
then swap the positions of foo and baz, then run the pipe again:
baz | bar | foo # with output going to file 2
and so on - any number of times, all in the same program run.
This feature lets you experiment with, and validate, your pipeline logic, to make sure that it does what you intended, e.g. you can check the output both before and after swapping components of the pipe, to decide which order you really need - or which order is optimal - see next paragraph.
The feature can also be used to time the execution of two or more different versions of the pipeline (with vs. without swapping of components), to see which runs faster, for cases where changing the order of those components makes no difference to the output, e.g. if those two components are commutative, in the mathematical sense (like a + b = b + a).
Blog post about swapping pipe components at run time with pipe_controller:
http://jugad2.blogspot.in/2012/10/swapping-pipe-components-at-runtime.html
pipe_controller v0.3 can be downloaded here:
https://bitbucket.org/vasudevram/pipe_controller/downloads
(Click on the "Branches" tab on that page)
- Vasudev Ram
www.dancingbison.comjugad2.blogspot.comtwitter.com/vasudevram
Announcing the first Columbus Python Workshop for women and their friends!
Jan. 18-19, 2013
The Columbus Python Workshop for women and their friends is a free
hands-on introduction to computer programming that's fun, accessible,
and practical even to those who've never programmed at all before. We
empower women of all ages and backgrounds to learn programming in a
beginner-friendly environment.
Thanks to Pillar Technologies for hosting the workshop in their
brand-new office in Columbus' Short North!
The workshop is the latest in a series based on the famous Boston
Python Workshop; they've already introduced hundreds of beginners to
programming in Boston, Indianapolis, Portland, Chicago, and Kansas
City. Now it's Ohio's turn, so spread the word!
Get more details and sign up now:
https://openhatch.org/wiki/Columbus_Python_Workshop
* Happy Ada Lovelace Day! Traditionally, Ada Lovelace Day is
celebrated by highlighting the achievements of present and past women
in programming. Today, instead, I'm saluting the contributors of the
future! *
--
- Catherine
http://catherinedevlin.blogspot.com
Hello,
The CFP and registration for SciPy India 2012 (http://scipy.in), to be
held in IIT Bombay from December 27-29 is open. Please spread the word!
Scipy In is a conference providing opportunities to spread the use of
the Python programming language in the Scientific Computing community
in India. One of the goals of the conference is to combine education,
engineering, and science with computing through the medium of
Python. This conference also aims to spread the use of Python for
Scientific Computing in various fields and among different
communities.
Call for Papers
================
We look forward to your submissions on the use of Python for
Scientific Computing and Education. This includes pedagogy,
exploration, modeling and analysis from both applied and
developmental perspectives. We welcome contributions from academia
as well as industry.
For details on the paper submission please see here:
http://scipy.in/scipyin/2012/talks-cfp/
Important Dates
================
- Call for proposals end: 1st November 2012, Thursday
- List of accepted proposals will be published: 19th November 2012.
- Submission of first presentation: 10th December 2012.
- Submission of final presentation: 20th December 2012.
We look forward to seeing you at SciPy India.
Regards,
Prabhu Ramachandran and Jarrod Millman
PyOpenGL 3.0.2 (final, finally) has been released. The major changes since 3.0.1 (released in 2010!) are:
* OpenGL core support up to 4.3 level [1]
* OpenGL extension support from the current registry [1]
* Some missing FreeGLUT extensions added
* OpenGL.GL.framebufferobjects providing ARB/EXT alternates for framebuffer operations
* Experimental OSMesa (Offscreen Mesa) context (use the environment variable PYOPENGL_PLATFORM=osmesa)
Codebase changes:
* Experimental Python 3.2 and PyPy support
* Win64 Support (including OpenGL_accelerate)
* Numarray (the ancient transitional module between Numeric and numpy) is no longer supported as an array type
* More compact auto-generated wrappers
* Large numbers of bug fixes
Downloads are at:
http://pypi.python.org/pypi/PyOpenGL/3.0.2http://pypi.python.org/pypi/PyOpenGL-accelerate/3.0.2
Future Compatibility Notes:
* This will be the last release of PyOpenGL to support Python 2.5 (and
it supports Python 2.5 in source-release only mode).
o PyOpenGL will be moving to a "shared code" approach for Python
2/3 support, which makes supporting the older Python releases
problematic
* This will be the last release to support the use of bare numbers as
number-array data-types
o i.e. passing 1.00 to a function expecting an array/address of an
float
o Use Glfloat( 1.00 ) to pass in an array-compatible value
o Passing in an int/long will generate a GLvoidp( I ) to allow for
easy offset-address-style API usage
* The ancient Numeric package (as distinct from Numpy) will be dropped
as a supported array format
o Numeric itself has long since been deprecated, use Numpy
Enjoy all,
Mike
[1] Note: OpenGL extension and higher-level core feature support is auto-generated. As always, we are limited by the number of test programs that exercise more advanced features and the availability of hardware that can support the features on which to test
-- ________________________________________________ Mike C. Fletcher
Designer, VR Plumber, Coder http://www.vrplumber.comhttp://blog.vrplumber.com
Hello,
It seemed like there were several requests to enable ini file parsing with
argparse. I wrote module to do this.
I'd be curious to know if this is useful and anyone has a better approach.
See the code here:
http://pypi.python.org/pypi/ConfArgParse
Thanks!
S Joshua Swamidass
http://swami.wustl.edu/
Hello,
The ATOMac team is proud to announce a new release of ATOMac.
About ATOMac:
Short for Automated Testing on Mac, ATOMac is the first Python library
to fully enable GUI testing of Macintosh applications via the Apple
Accessibility API. Existing tools such as using appscript to send
messages to accessibility objects are painful to write and slow to
use. ATOMac has direct access to the API. It's fast and easy to use to
write GUI tests.
Changes in this release:
* LDTP compatibility added. LDTP allows testers to write a single
script that will automate test cases on Linux, Windows, and now Mac OS
X. Information and documentation on LDTP can be found at the LDTP home
page[0].
* Detailed documentation - Sphinx has been configured to generate
documentation for ATOMac. When this documentation is uploaded, it will
be linked from the home page[1].
* Various fixes to reading and writing certain accessibility attributes.
* Sending function keys and newlines now works as intended.
A detailed changelog is available[2].
Download source:
https://github.com/pyatom/pyatom
Documentation references:
Sphinx documentation is being uploaded. In the meantime, please see
the readme at the bottom of the github page listed above.
Report bugs - https://github.com/pyatom/pyatom/issues
To subscribe to ATOMac mailing lists, visit http://lists.pyatom.com/
IRC Channel - #atomac on irc.freenode.net
[0] http://ldtp.freedesktop.org
[1] http://pyatom.com/
[2] https://raw.github.com/pyatom/pyatom/master/CHANGELOG.txt