[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Needed help for Gsoc2013 Project ideas



Hi,

On 03/07/2013 19:15, Abhishek Singh wrote:
>>There are already a few unit tests, but many parts of dak need access to
>>the repository and the database.  Just a random example: when dak
>>processes an upload to unstable it makes sure the upload has a higher
>>version number than already present in unstable.  We currently have no
>>way of testing such code automatically.
> 
>>This is where the Summer of Code project comes in: we want you to write
>>a framework for such tests and also to implement some.
> 
> I think we could use mock tests for unit testing. May be we can use
> pytest frame work for mock testing. Pytest provides several advantages
> such as it helps in reducing boilerplate (this is area where funcargs
> plays a very important role) and makes writing tests much more pythonic
> and easier.

You mean removing the database and filesystem access by something like
described on [1]?

  [1] <http://pytest.org/latest/monkeypatch.html>

That might work to provide some more unit tests, but there would still
be left many things that I would like to have tests for:

Some parts like dak/generate_packages_sources2.py or dak/dominate.py
consists of SQL queries that should be tested. You cannot do anything
without a database here.

I also would really like to have tests to make sure installing a package
in a fresh dak installation would work.

You can of course built on existing code if it helps you, no need to
implement everything for scratch.

Ansgar


Reply to: