fossasia / searss

Search to RSS tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve tests

mariobehling opened this issue · comments

As mentioned elsewhere by @rhemon

it would better if you could improve the tests. such as testing if results collected are matching a pattern or not? also it might be more organised if you had each of the classes in different files. and have all of the tests in a tests directory. you will see lot of repositories follow this pattern. try a larger coverage increase.
... it should only be concentrating on rss-generator.py but there are other files part of it as well. we might need to look into that.

@rhemon should I start writing tests, I have throughly tested the working I am ready to add tests :) Also I would like to discuss, more thorough testing, as in right now we are only testing if we are getting response with non-zero length, is it enough?

@In-vincible yes please go ahead and add tests. u can ask for help anytime. once you add the tests u thought of, do a Pull Request. if we think something else can be added or changed we can mention it there.

Cool! so I should add tests in tests.py only?

@In-vincible you can do that, or else if you want you can have a test folder containing a TestSuite and different test cases (each with its own file) for the different search engines used, also for the other helper function used.

I have added tests for duckduckgo and askcom, I am into adding tests for generateFeed function should I give a PR at this stage for discussion purpose?

Also I would love to do lots of other scraping, I am aware with selenium as well, do we have any more plans for searss @mariobehling @rhemon

Should we add unittest-xml module for XML testing?

Okay I am putting up the PR, while locally I have am setting up the unittest-xml for testing the xml patterns, we will discuss the xml things on the PR then :)