Re: Put memorydb in roundup path?

John Kristensen <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.devel
Message-ID <[email protected]>
Hello All,

I'd be in favour of having the memorydb being available somewhere like 
`roundup/test/memorydb.py`.

In the past I've copied the existing `test/memorydb.py` file into my 
tracker `tests` directory and overridden the `create()` method. It has 
worked fine, but having a copy of the file seemed a bit of a kludge. So 
this would be a nice change.


Another option might be to enable the sqlite backend to use an in-memory 
DB, which could be used for testing. The advantage would be that it 
would provide a "real" backend to test against instead of a "mock" backend.

SeeYa,
John.


On 27/3/21 1:45 am, John P. Rouillard wrote:
> Hi Ralf:
> 
> In message <[email protected]>,
> Ralf Schlatterbeck writes:
>> [...] if I could use the memorydb implementation that
>> currently lives in test/memorydb.py so it would be nice if this would be
>> included in the standard roundup path, not in the test directory.
>>
>> What do you think? Would this be a risk that people use that as a
>> backend and wonder why their data is not persistent :-) ?
> 
> That was my first thought on reading the suject line 8-).
> 
>> Note that it currently has some hard-coded defaults, e.g. a convenience
>> "create" method in that file uses the standard "classic" schema. I'm not
>> sure this has to be changed for using memorydb in my own tests yet.
> 
> I would leave these as examples in the class. Probably should add a
> comment that they are ment to be used with the classic tracker's
> schema. I assume they can be overridden by:
> 
>    import memorydb
> 
>    class memorydb:
> 
>       def create(...):
>         ...
> 
> in your test setup routine.
> 
> What do you think about putting it in roundup/test/memorydb.py so it
> needs to be imported as test.memorydb. Hopefully by not putting it in
> backends, people will realise it should not be used as a backend.  If
> you choose this route make sure to add a changes entry and add it to
> the manifest so it gets packaged/installed.
> 
> Also change at least one test to use it in it's new location so we get
> some test coverage on it.
> 
> Alternatively is it standalone enough that you can just copy it into
> your installed roundup tree, or into the test suite for your tracker?
> Could it even live in the lib directory of your tracker?
> 
> --
> 				-- rouilj
> John Rouillard
> ===========================================================================
> My employers don't acknowledge my existence much less my opinions.
> 
> 
> _______________________________________________
> Roundup-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/roundup-devel
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.