diff --git a/test/gettestdata.py b/test/gettestdata.py index 0cb6cb964..f1012f03c 100644 --- a/test/gettestdata.py +++ b/test/gettestdata.py @@ -2,7 +2,7 @@ import argparse -from os.path import join, exists +from os.path import exists from os import makedirs from py4DSTEM import _TESTPATH as testpath diff --git a/test/test_braggvectors.py b/test/test_braggvectors.py index 1b7b6603a..7b0a9989b 100644 --- a/test/test_braggvectors.py +++ b/test/test_braggvectors.py @@ -52,7 +52,7 @@ def setup_class(cls): # tests def test_BraggVectors_import(self): - from py4DSTEM.braggvectors import BraggVectors + from py4DSTEM.braggvectors import BraggVectors # noqa: F401 pass @@ -67,7 +67,7 @@ def test_disk_detection_selected_positions(self): 68, ) - disks_selected = self.datacube.find_Bragg_disks( + disks_selected = self.datacube.find_Bragg_disks( # noqa: F841 data=(rxs, rys), template=self.probe.kernel, **self.detect_params, diff --git a/test/test_crystal.py b/test/test_crystal.py index d5938628f..80d5d9e75 100644 --- a/test/test_crystal.py +++ b/test/test_crystal.py @@ -1,4 +1,3 @@ -import numpy as np # from py4DSTEM.classes import ( # Crystal diff --git a/test/test_native_io/test_calibration_io.py b/test/test_native_io/test_calibration_io.py index c0f9cd4ab..026ce6845 100644 --- a/test/test_native_io/test_calibration_io.py +++ b/test/test_native_io/test_calibration_io.py @@ -1,6 +1,6 @@ -import py4DSTEM -import numpy as np -from os.path import join +#import py4DSTEM +#import numpy as np +#from os.path import join # set filepath # path = join(py4DSTEM._TESTPATH, "filename") diff --git a/test/test_native_io/test_realslice_read.py b/test/test_native_io/test_realslice_read.py index eeee5217d..168737caf 100644 --- a/test/test_native_io/test_realslice_read.py +++ b/test/test_native_io/test_realslice_read.py @@ -10,4 +10,5 @@ def test_read_realslice(): - realslice = py4DSTEM.read(filepath, datapath="4DSTEM/Fit Data") + realslice = py4DSTEM.read(filepath, datapath="4DSTEM/Fit Data") # noqa: F841 + diff --git a/test/test_native_io/test_single_object_io.py b/test/test_native_io/test_single_object_io.py index 4d2e98d28..2d7791435 100644 --- a/test/test_native_io/test_single_object_io.py +++ b/test/test_native_io/test_single_object_io.py @@ -1,14 +1,11 @@ import numpy as np -from os.path import join, exists -from os import remove +from os.path import join from numpy import array_equal import py4DSTEM from py4DSTEM import save, read -import emdfile as emd from py4DSTEM import ( - Calibration, DiffractionSlice, RealSlice, QPoints, diff --git a/test/test_native_io/test_v0_14.py b/test/test_native_io/test_v0_14.py index c71638c8e..0132a0d3c 100644 --- a/test/test_native_io/test_v0_14.py +++ b/test/test_native_io/test_v0_14.py @@ -38,7 +38,7 @@ def _make_v14_test_file(): alpha, qx0, qy0 = py4DSTEM.process.probe.get_probe_size(probe.probe) # prepare the probe kernel - kern = probe.get_kernel(mode="sigmoid", origin=(qx0, qy0), radii=(alpha, 2 * alpha)) + kern = probe.get_kernel(mode="sigmoid", origin=(qx0, qy0), radii=(alpha, 2 * alpha)) # noqa: F841 # Set disk detection parameters detect_params = { @@ -54,7 +54,7 @@ def _make_v14_test_file(): } # compute - braggpeaks = datacube.find_Bragg_disks( + braggpeaks = datacube.find_Bragg_disks( # noqa: F841 template=probe.kernel, **detect_params, ) diff --git a/test/test_probe.py b/test/test_probe.py index 573a55f31..d55e0dd3f 100644 --- a/test/test_probe.py +++ b/test/test_probe.py @@ -1,7 +1,6 @@ import py4DSTEM from py4DSTEM import Probe import numpy as np -from os.path import join # set filepath path = py4DSTEM._TESTPATH + "/small_datacube.dm4" diff --git a/test/test_strain.py b/test/test_strain.py index d309c5ffb..e2be240c4 100644 --- a/test/test_strain.py +++ b/test/test_strain.py @@ -1,7 +1,6 @@ import py4DSTEM from py4DSTEM import StrainMap from os.path import join -from numpy import zeros # set filepath diff --git a/test/test_workflow/test_basics.py b/test/test_workflow/test_basics.py index 00a0ed992..0c838707a 100644 --- a/test/test_workflow/test_basics.py +++ b/test/test_workflow/test_basics.py @@ -31,7 +31,7 @@ def test_show(self): # virtual diffraction and imaging def test_virt_diffraction(self): - dp_mean = self.datacube.get_dp_mean() + dp_mean = self.datacube.get_dp_mean() # noqa: F841 self.datacube.get_dp_max() def test_virt_imaging_bf(self): diff --git a/test/test_workflow/test_disk_detection_basic.py b/test/test_workflow/test_disk_detection_basic.py index c707dfc40..be9d8a1c8 100644 --- a/test/test_workflow/test_disk_detection_basic.py +++ b/test/test_workflow/test_disk_detection_basic.py @@ -51,14 +51,14 @@ def test_disk_detection_selected_positions(self): 68, ) - disks_selected = self.datacube.find_Bragg_disks( + disks_selected = self.datacube.find_Bragg_disks( # noqa: F841 data=(rxs, rys), template=self.probe.kernel, **self.detect_params, ) def test_disk_detection(self): - braggpeaks = self.datacube.find_Bragg_disks( + braggpeaks = self.datacube.find_Bragg_disks( # noqa: F841 template=self.probe.kernel, **self.detect_params, ) diff --git a/test/test_workflow/test_disk_detection_with_calibration.py b/test/test_workflow/test_disk_detection_with_calibration.py index bd9fec244..f3892b4bc 100644 --- a/test/test_workflow/test_disk_detection_with_calibration.py +++ b/test/test_workflow/test_disk_detection_with_calibration.py @@ -41,7 +41,7 @@ def setup_class(cls): # tests def test_disk_detection(self): - braggpeaks = self.datacube.find_Bragg_disks( + braggpeaks = self.datacube.find_Bragg_disks( # noqa: F841 template=self.probe.kernel, **self.detect_params, )