summaryrefslogtreecommitdiff
path: root/silx/gui/plot/test/testStackView.py
diff options
context:
space:
mode:
Diffstat (limited to 'silx/gui/plot/test/testStackView.py')
-rw-r--r--silx/gui/plot/test/testStackView.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/silx/gui/plot/test/testStackView.py b/silx/gui/plot/test/testStackView.py
index 8d2a0ee..3dcea36 100644
--- a/silx/gui/plot/test/testStackView.py
+++ b/silx/gui/plot/test/testStackView.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2016-2017 European Synchrotron Radiation Facility
+# Copyright (c) 2016-2018 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -32,7 +32,7 @@ __date__ = "20/03/2017"
import unittest
import numpy
-from silx.gui.test.utils import TestCaseQt
+from silx.gui.test.utils import TestCaseQt, SignalListener
from silx.gui import qt
from silx.gui.plot import StackView
@@ -187,6 +187,17 @@ class TestStackView(TestCaseQt):
"beau sirop, mi-sirop, siroté, gagne-sirop, sirop-grelot,"
" passe-montagne, sirop au bon goût.")
+ def testStackFrameNumber(self):
+ self.stackview.setStack(self.mystack)
+ self.assertEqual(self.stackview.getFrameNumber(), 0)
+
+ listener = SignalListener()
+ self.stackview.sigFrameChanged.connect(listener)
+
+ self.stackview.setFrameNumber(1)
+ self.assertEqual(self.stackview.getFrameNumber(), 1)
+ self.assertEqual(listener.arguments(), [(1,)])
+
class TestStackViewMainWindow(TestCaseQt):
"""Base class for tests of StackView."""