[py-dev] RFC pytest metadata store plugin

holger krekel holger at merlinux.eu
Mon Feb 15 10:54:15 CET 2010


On Sun, Feb 14, 2010 at 09:06 +0100, Ronny Pfannschmidt wrote:
> it would basically be a key-value store for test items/fspath items
> 
> it should provide 2 objects as funcargs/py.test namesspace items
> 
> path_meta
>     store key-values for the current fspath
> item_meta
>     store key-values for the current test item

don't think funcargs are of primary interest for this but rather other plugins
(like codecheckers) who want to useit to store information. It would also help
to implement persistence across test sessions and features like 
"run last failing tests" without having to use "--looponfailing"
from the 'python-xdist' plugin. 

> the need i have for such a feature is based in the speed issue of the
> codecheckers plugin, in particular pep8 is slow, and should be skipped
> in case of the file's mtime being less than the last run of the pep8
> check and had no issues
> 
> issues i havent clearly tought about yet is how to store and where to
> store
> 
> options i currently can think of are:
> 
> - xattr on the actual files/alternative streams
> - a sqlite db

IMHO neither - rather in a directory in the plain filesystem as 
this should work on any python and operating system. 
The main issue issues i see are

- how to determine the caching-data directory 
- how to provide a minimal interface to access and manipulate it. 

cheers
holger



More information about the Pytest-dev mailing list