Skip to content

test structure is introduced in pytest#26

Merged
AhmetCanSolak merged 1 commit intonapari:devfrom
AhmetCanSolak:teststructure
Oct 31, 2018
Merged

test structure is introduced in pytest#26
AhmetCanSolak merged 1 commit intonapari:devfrom
AhmetCanSolak:teststructure

Conversation

@AhmetCanSolak
Copy link
Copy Markdown

What does this PR do? Why are doing this? References?

Test structure was revised with @kne42 and @royerloic , here is updated introduction of test structure in pytest.

Type of change

[Please delete options that are not relevant.]

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

This commit consist of test files.

Final Checklist:

  • My PR is the possible minimum work for the desired functionality
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

@pep8speaks
Copy link
Copy Markdown

Hello @AhmetCanSolak! Thanks for submitting the PR.

Line 13:1: W391 blank line at end of file

Line 12:43: E712 comparison to True should be 'if cond is True:' or 'if cond:'
Line 15:43: E712 comparison to True should be 'if cond is True:' or 'if cond:'
Line 18:43: E712 comparison to True should be 'if cond is True:' or 'if cond:'
Line 21:43: E712 comparison to True should be 'if cond is True:' or 'if cond:'
Line 24:43: E712 comparison to False should be 'if cond is False:' or 'if not cond:'

Copy link
Copy Markdown
Member

@royerloic royerloic left a comment

Choose a reason for hiding this comment

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

Great!

@AhmetCanSolak AhmetCanSolak merged commit 4b71577 into napari:dev Oct 31, 2018
@AhmetCanSolak AhmetCanSolak deleted the teststructure branch November 1, 2018 17:50
Copy link
Copy Markdown
Member

@kne42 kne42 left a comment

Choose a reason for hiding this comment

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

Would prefer structure to look like {module}/tests/test_{file}.py instead of {module}/test_{file}.py to keep tests separate and "hidden" to an extent.

@@ -0,0 +1,24 @@
import pytest

import misc
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

relative imports please

@jni
Copy link
Copy Markdown
Member

jni commented Nov 2, 2018

I agree with @kne42, tests should be in a separate directory. See the scikit-image codebase for an example.

Can you explain what is going on with the meta dict? Where will this be used? I want to make sure that we don't deviate too far from (and certainly stay compatible with) imageio.

@kne42
Copy link
Copy Markdown
Member

kne42 commented Nov 2, 2018

@jni That was really there just for demo purposes since we don't actually have a standard for metadata yet.

ttung pushed a commit to ttung/napari that referenced this pull request Dec 20, 2019
…visible

The visibilitychanged slot currently updates the title regardless of the visibility. We are seeing a crash when the viewer is shut down and a signal is sent to the visibilitychanged slot.  That executes some code which causes a segfault in the python process[1].  This PR changes the visibility changed slot to only update the title bar if the widget is visible.

[1]
```
  * frame #0: 0x0000000115cc96e4 QtWidgets`QWidgetPrivate::reparentFocusWidgets(QWidget*) + 356
    frame napari#1: 0x0000000115cb99cf QtWidgets`QWidget::setParent(QWidget*, QFlags<Qt::WindowType>) + 911
    frame napari#2: 0x0000000115cb82c0 QtWidgets`QWidgetPrivate::init(QWidget*, QFlags<Qt::WindowType>) + 688
    frame napari#3: 0x0000000115d73e5e QtWidgets`QFrame::QFrame(QFramePrivate&, QWidget*, QFlags<Qt::WindowType>) + 14
    frame napari#4: 0x0000000115dc3705 QtWidgets`QLabel::QLabel(QWidget*, QFlags<Qt::WindowType>) + 277
    frame napari#5: 0x0000000116503189 QtWidgets.abi3.so`Sbk_QLabel_Init(_object*, _object*, _object*) + 1497
    frame napari#6: 0x000000010015f84d Python`wrap_init + 12
    frame napari#7: 0x0000000100113e64 Python`_PyObject_FastCallDict + 143
    frame napari#8: 0x00000001001b17a2 Python`call_function + 439
    frame napari#9: 0x00000001001aa46b Python`_PyEval_EvalFrameDefault + 3078
    frame napari#10: 0x00000001001b1ee2 Python`_PyEval_EvalCodeWithName + 1638
    frame napari#11: 0x00000001001b281b Python`_PyFunction_FastCallDict + 447
    frame napari#12: 0x0000000100113e99 Python`_PyObject_FastCallDict + 196
    frame napari#13: 0x0000000100113fa3 Python`_PyObject_Call_Prepend + 131
    frame napari#14: 0x0000000100113d1e Python`PyObject_Call + 101
    frame napari#15: 0x000000010015f7d1 Python`slot_tp_init + 57
    frame napari#16: 0x000000010015c782 Python`type_call + 178
    frame napari#17: 0x0000000100113e64 Python`_PyObject_FastCallDict + 143
    frame napari#18: 0x00000001001141fa Python`_PyObject_FastCallKeywords + 97
    frame napari#19: 0x00000001001b17a2 Python`call_function + 439
    frame napari#20: 0x00000001001aa4fb Python`_PyEval_EvalFrameDefault + 3222
    frame napari#21: 0x00000001001b28e0 Python`_PyFunction_FastCall + 110
    frame napari#22: 0x0000000100113e99 Python`_PyObject_FastCallDict + 196
    frame napari#23: 0x0000000100113fa3 Python`_PyObject_Call_Prepend + 131
    frame napari#24: 0x0000000100113d1e Python`PyObject_Call + 101
    frame napari#25: 0x000000011126f146 libpyside2.abi3.5.14.dylib`PySide::SignalManager::callPythonMetaMethod(QMetaMethod const&, void**, _object*, bool) + 534
    frame napari#26: 0x000000011126eb77 libpyside2.abi3.5.14.dylib`PySide::SignalManager::qt_metacall(QObject*, QMetaObject::Call, int, void**) + 519
```
aganders3 pushed a commit to aganders3/napari that referenced this pull request Aug 31, 2023
…rebase

Migrate more action_manager actions to app-model
napari-bot pushed a commit to napari-bot/napari that referenced this pull request Oct 3, 2023
…/brisvag/napari/main

Update `app-model`, `superqt`, `vispy`
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.

5 participants