diff options
author | Picca Frédéric-Emmanuel <picca@debian.org> | 2021-09-07 14:39:36 +0200 |
---|---|---|
committer | Picca Frédéric-Emmanuel <picca@debian.org> | 2021-09-07 14:39:36 +0200 |
commit | d3194b1a9c4404ba93afac43d97172ab24c57098 (patch) | |
tree | a1604130e1401dc1cbd084518ed72869dc92b86f /silx/gui/data/test | |
parent | b3bea947efa55d2c0f198b6c6795b3177be27f45 (diff) |
New upstream version 0.15.2+dfsg
Diffstat (limited to 'silx/gui/data/test')
-rw-r--r-- | silx/gui/data/test/test_arraywidget.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/silx/gui/data/test/test_arraywidget.py b/silx/gui/data/test/test_arraywidget.py index 7785ac5..87081ed 100644 --- a/silx/gui/data/test/test_arraywidget.py +++ b/silx/gui/data/test/test_arraywidget.py @@ -1,7 +1,7 @@ # coding: utf-8 # /*########################################################################## # -# Copyright (c) 2016-2020 European Synchrotron Radiation Facility +# Copyright (c) 2016-2021 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 @@ -34,6 +34,7 @@ import numpy from silx.gui import qt from silx.gui.data import ArrayTableWidget +from silx.gui.data.ArrayTableModel import ArrayTableModel from silx.gui.utils.testutils import TestCaseQt import h5py @@ -186,6 +187,18 @@ class TestArrayWidget(TestCaseQt): b1 = self.aw.getData(copy=False) self.assertIs(b0, b1) + def testClipping(self): + """Test clipping of large arrays""" + self.aw.show() + self.qWaitForWindowExposed(self.aw) + + data = numpy.arange(ArrayTableModel.MAX_NUMBER_OF_SECTIONS + 10) + + for shape in [(1, -1), (-1, 1)]: + with self.subTest(shape=shape): + self.aw.setArrayData(data.reshape(shape), editable=True) + self.qapp.processEvents() + class TestH5pyArrayWidget(TestCaseQt): """Basic test for ArrayTableWidget with a dataset. |