I'm new to python and have just been looking into a solution for Mocking
objects. In particular, at the moment, testing some code that needs to
access hardware IOs using DLLs. I do this using Ctypes.
However, on my dev machine, I don't have the same hardware so calling the
DLL functions will not work as expected. Therefore I'd like to mock out the
ctypes dll calls. Can you give me an indication of how you would go about
doing this with Simplistix? Just so you know, I use py.test for unit
testing.

Thanks,

Jack

On Fri, Jan 14, 2011 at 12:38 PM, Chris Withers <ch...@simplistix.co.uk>wrote:

> Hi All,
>
> I'm very happy to announce the first fully-documented release of
> TestFixtures, my collection of testing fixtures and helpers that I've been
> collecting for the last couple of years.
>
> Along with my own take on a lot of the common fixtures and helpers, it has
> some bits that I haven't seen anywhere else and so would like to point out:
>
> - Comparison objects for comparing objects that don't natively support
>  comparison:
>
>  http://packages.python.org/testfixtures/comparing.html#comparison-objects
>
> - Helpful mock objects for when you want to test code that makes use of
>  datetime.datetime.now, datetime.date.today or time.time:
>
>  http://packages.python.org/testfixtures/datetime.html
>
> - Helpers for capturing and checking messages logged from your code
>  using the python logging framework:
>
>  http://packages.python.org/testfixtures/logging.html
>
> - Helpers for working with temporary directories in tests. In
>  particular, quickly and easily creating temporary directories and
>  files within them and making assertions about things written to them
>  by the code under test:
>
>  http://packages.python.org/testfixtures/files.html
>
> There's plenty more in there too!
>
> Please do let me know what you find useful, if you find any bugs or if
> there are any features you'd like to see added.
>
> The package is on PyPI and a full list of all the links to docs, issue
> trackers and the like can be found here:
>
> http://www.simplistix.co.uk/software/python/testfixtures
>
> cheers,
>
> Chris
>
> --
> Simplistix - Content Management, Batch Processing & Python Consulting
>           - http://www.simplistix.co.uk
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
The earth is a very small stage in a vast cosmic arena. Think of the rivers
of blood spilled by all those generals and emperors so that in glory and in
triumph they could become the momentary masters of a fraction of a dot.
- Carl Sagan [Pale Blue Dot]
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to