Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] Widget testing utilities #1939

Merged

Conversation

ales-erjavec
Copy link
Contributor

Issue

Add some utilities for testing widgets, some datasets, ...
Also includes fix (and test) for gh-1938

Description of changes
Includes
  • Code changes
  • Tests
  • Documentation

@ales-erjavec ales-erjavec force-pushed the fixes/linearprojection-nan-columns branch from e675d5f to f0ddfb0 Compare January 20, 2017 19:40
@codecov-io
Copy link

codecov-io commented Jan 20, 2017

Current coverage is 89.31% (diff: 100%)

Merging #1939 into master will not change coverage

@@             master      #1939   diff @@
==========================================
  Files            86         86          
  Lines          9119       9119          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits           8145       8145          
  Misses          974        974          
  Partials          0          0          

Sunburst

Powered by Codecov. Last update bb58be8...92fe2fb

@astaric astaric added this to the 3.3.11 milestone Jan 20, 2017
One discrete constant class D with NaN values.

Mixed continuous/discrete/string class metas ({X,D,S}M)
One discrete constant class (D) with NaN values
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicated line

Copy link
Member

@astaric astaric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lint also complains that there are some unused imports.

If the ones in try:except block are there for a reason, could you add a comment that clarifies that? Same goes for those, that are needed for doctests.

https://travis-ci.org/biolab/orange3/jobs/193844437#L580

return os.path.join(dirname, filename)

@classmethod
def data_1(cls):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These methods could use more descriptive names. maybe missing_data_1? Telling what exactly is in the dataset would probably make them longer that 50 characters.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, but cant think of a naming scheme besides missing_data_{1,2,3}.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So maybe just missing_data_n (with matching/modified filenames of the test files)?

I am afraid that otherwise the pattern will continue and we will get data_{4,5,6,7,8} in the future, making it impossible to tell what kind of data is used in the test.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok


import numpy as np
from AnyQt.QtWidgets import (
QApplication, QComboBox, QSpinBox, QDoubleSpinBox, QSlider
)

import Orange.data
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Table is already imported in the line 15. Maybe the rest of the symbols could be imported in the same fashion?

@ales-erjavec ales-erjavec force-pushed the fixes/linearprojection-nan-columns branch 4 times, most recently from 77147bf to 92fe2fb Compare January 23, 2017 13:47
@ales-erjavec ales-erjavec force-pushed the fixes/linearprojection-nan-columns branch from 92fe2fb to 76814cd Compare January 24, 2017 11:34
@astaric astaric merged commit 40c677d into biolab:master Jan 24, 2017
@ales-erjavec ales-erjavec deleted the fixes/linearprojection-nan-columns branch January 27, 2017 10:39
astaric added a commit that referenced this pull request Feb 3, 2017
…-columns

[ENH] Widget testing utilities
(cherry picked from commit 40c677d)

 Conflicts:
	MANIFEST.in
	Orange/widgets/tests/base.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants