Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tomotools
tomwer
Commits
656a405e
Commit
656a405e
authored
Jul 21, 2021
by
payno
Committed by
Henri Payno
May 03, 2022
Browse files
[gui][normalization] replace hard coded path to a MockScan
parent
77b58e0c
Changes
1
Hide whitespace changes
Inline
Side-by-side
tomwer/gui/reconstruction/normalization/test/test_intensity.py
View file @
656a405e
...
...
@@ -33,26 +33,38 @@ __date__ = "23/06/2021"
from
silx.gui.utils.testutils
import
TestCaseQt
from
tomwer.gui.reconstruction.normalization.intensity
import
NormIntensityWindow
from
tomwer.core.
scan.hdf5scan
import
HDF5TomoScan
from
tomwer.core.
utils.scanutils
import
MockHDF5
from
silx.gui
import
qt
import
tempfile
import
shutil
import
os
class
TestNormIntensityWindow
(
TestCaseQt
):
def
setUp
(
self
):
super
(
TestNormIntensityWindow
,
self
).
setUp
()
self
.
_widget
=
NormIntensityWindow
(
parent
=
None
)
self
.
_tmp_dir
=
tempfile
.
mkdtemp
()
scan_path
=
os
.
path
.
join
(
self
.
_tmp_dir
,
"my_scan_2"
)
self
.
scan
=
MockHDF5
(
scan_path
=
scan_path
,
n_ini_proj
=
10
,
n_proj
=
10
,
n_alignement_proj
=
2
,
create_final_ref
=
False
,
create_ini_dark
=
True
,
create_ini_ref
=
True
,
n_refs
=
1
,
).
scan
def
tearDown
(
self
):
super
(
TestNormIntensityWindow
,
self
).
tearDown
()
self
.
_widget
.
setAttribute
(
qt
.
Qt
.
WA_DeleteOnClose
)
self
.
_widget
.
close
()
self
.
_widget
=
None
shutil
.
rmtree
(
self
.
_tmp_dir
)
def
test
(
self
):
scan
=
HDF5TomoScan
(
scan
=
"/media/payno/0c327c0f-2e67-45eb-b1c3-c7aebe6b41d7/data/dataset_esrf/dxfile/tomo_00068/tomo_00068.nx"
,
entry
=
"entry0000"
,
)
self
.
_widget
.
setScan
(
scan
)
self
.
_widget
.
setScan
(
self
.
scan
)
self
.
_widget
.
show
()
self
.
qapp
.
exec
()
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment