Skip to content

[FIX] test_owfile: Fix unreliable test_warning_from_another_thread#6085

Merged
markotoplak merged 1 commit intobiolab:masterfrom
ales-erjavec:fixes/owfile-tests
Aug 8, 2022
Merged

[FIX] test_owfile: Fix unreliable test_warning_from_another_thread#6085
markotoplak merged 1 commit intobiolab:masterfrom
ales-erjavec:fixes/owfile-tests

Conversation

@ales-erjavec
Copy link
Copy Markdown
Contributor

Issue

Fix intermittent test failure:

FAIL: test_warning_from_another_thread (Orange.widgets.data.tests.test_owfile.TestOWFile)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/runner/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/unittest/mock.py", line 1369, in patched
    return func(*newargs, **newkeywargs)
  File "/Users/runner/work/orange3/orange3/.tox/orange-released/lib/python3.10/site-packages/Orange/widgets/data/tests/test_owfile.py", line 693, in test_warning_from_another_thread
    with self.assertWarns(UserWarning):
AssertionError: UserWarning not triggered
Description of changes

Replace use of time.sleep to sequence threaded code.

Includes
  • Code changes
  • Tests
  • Documentation

Replace use of `time.sleep` to sequence threaded code.
@codecov
Copy link
Copy Markdown

codecov bot commented Aug 1, 2022

Codecov Report

Merging #6085 (8c1fdb3) into master (04c0e73) will increase coverage by 0.02%.
The diff coverage is 96.61%.

@@            Coverage Diff             @@
##           master    #6085      +/-   ##
==========================================
+ Coverage   86.59%   86.62%   +0.02%     
==========================================
  Files         315      315              
  Lines       67317    67479     +162     
==========================================
+ Hits        58295    58454     +159     
- Misses       9022     9025       +3     

@markotoplak markotoplak merged commit d53ec7d into biolab:master Aug 8, 2022
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.

2 participants