Ticket #1128 (new task)

Opened 2 years ago

Last modified 2 years ago

Unit tests for imputation

Reported by: janez Owned by: janez
Milestone: 3.0 Component: library
Severity: minor Keywords:
Cc: Blocking:
Blocked By:

Description


Change History

comment:1 Changed 2 years ago by whoeverest

I made a very basic draft for the imputation test suite. Please check it out and tell me if I'm on the right track, especially in terms of the structuring (decorators, inheritance). Thanks.

Here's a link to the file:  https://bitbucket.org/whoeverest/orange/src/473741bc38c2/Orange/testing/unit/tests/test_imputation.py

comment:2 Changed 2 years ago by janez

I guess you are. ;) The problem is that this is a ticket for Orange 3.0 and I'm the only one who works on it at the moment (the others will now follow soon). On the other hand, I don't know this decorator stuff - we don't have them in 3.0 yet, so I write tests for Orange 3.0 the old fashioned way. Anyway, I think you probably forgot to add the data file (or I *really* don't get these fancy test_on_data decorators ;).

Although the ticket refers to 3.0, it's great that you're adding the tests to 2.5, too. If you just add the data, we can add the test to the repository and I'll also copy it to orange30 project.

Thanks!

comment:3 Changed 2 years ago by whoeverest

Cool, I'll finish the test and issue a pull request.

I don't fully understand them either, but from what I get they do the following: the @datasets_driven decorator iterates and passes datasets from the list to every @test_on_data function (that's the dataset argument.) I've created a new test_imputation.tab dataset on which the functions are tested.

Thanks for the feedback! :)

Note: See TracTickets for help on using tickets.