biolab / orange3-single-cell

🍊🔬 Orange add-on for gene expression of single cell data
https://singlecell.biolab.si/
Other
17 stars 25 forks source link

maintenance, tox, github actions #381

Closed JakaKokosar closed 3 years ago

JakaKokosar commented 3 years ago
Issue

https://github.com/biolab/orange3/issues/5145

Description of changes
JakaKokosar commented 3 years ago

@markotoplak, segmentation fault problems if you want to have fun 😅

ales-erjavec commented 3 years ago

Maybe try

diff --git a/orangecontrib/single_cell/tests/test_owdatasets.py b/orangecontrib/single_cell/tests/test_owdatasets.py
index 1b92507..c169465 100644
--- a/orangecontrib/single_cell/tests/test_owdatasets.py
+++ b/orangecontrib/single_cell/tests/test_owdatasets.py
@@ -1,4 +1,5 @@
 import unittest
+from unittest.mock import patch

 from orangecontrib.single_cell.widgets.owscdatasets import OWscDataSets
 from Orange.widgets.tests.base import WidgetTest
@@ -7,7 +8,10 @@ from Orange.widgets.tests.base import WidgetTest
 class TestOWscDataSets(WidgetTest):

     def test_widget_setup(self):
-        self.widget = self.create_widget(OWscDataSets)
+        with patch.object(OWscDataSets, "list_remote",
+                          staticmethod(lambda: [])):
+            self.widget = self.create_widget(OWscDataSets)
+            self.wait_until_finished(self.widget)

 if __name__ == '__main__':

Although the problem is in the base class (list_remote, ... should not be instance methods)

JakaKokosar commented 3 years ago

@ales-erjavec this was the issue yes, thanks!