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

[FIX] owlouvainclustering: Make the task completion handler a single slot #3182

Merged
merged 1 commit into from
Aug 3, 2018

Conversation

ales-erjavec
Copy link
Contributor

@ales-erjavec ales-erjavec commented Aug 3, 2018

Issue

The
Orange.widgets.unsupervised.tests.test_owlouvain.TestOWLouvain.test_clusters_ordered_by_size test errors randomly with:

======================================================================
ERROR: test_clusters_ordered_by_size (Orange.widgets.unsupervised.tests.test_owlouvain.TestOWLouvain)
Cluster names should be sorted based on the number of instances.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/aleserjavec/workspace/orange3/Orange/widgets/unsupervised/tests/test_owlouvain.py", line 47, in test_clusters_ordered_by_size
    clustering = output.get_column_view('Cluster')[0].astype(int)
AttributeError: 'NoneType' object has no attribute 'get_column_view'

----------------------------------------------------------------------
Description of changes

Make the task completion handler a single slot.

The handlers are invoked with the Qt.QueuedConnection semantics and the first (_processing_complete) advertised to the world that the processing has completed, but the actual send would be done later at an unspecified time. This tripped the TestOWLouvain.test_clusters_ordered_by_size test.

Includes
  • Code changes
  • Tests
  • Documentation

The handlers are invoked with the Qt.QueuedConnection semantics and the
first (_processing_complete) advertised to the world that the processing
has completed, but the actual send  would be done later at an unspecified
time. This tripped the `TestOWLouvain.test_clusters_ordered_by_size`
test.
@lanzagar lanzagar added this to the 3.15 milestone Aug 3, 2018
@codecov-io
Copy link

Codecov Report

Merging #3182 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #3182      +/-   ##
==========================================
+ Coverage   82.63%   82.63%   +<.01%     
==========================================
  Files         340      340              
  Lines       58788    58790       +2     
==========================================
+ Hits        48577    48579       +2     
  Misses      10211    10211

@lanzagar lanzagar merged commit 449d09d into biolab:master Aug 3, 2018
@ales-erjavec ales-erjavec deleted the fixes/owlouvain-on-complete branch September 12, 2018 10:09
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