Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rettigl committed Jan 3, 2025
1 parent cb60ebc commit 16aa98e
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 10 deletions.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ lint.select = [
"E", # pycodestyle
"W", # pycodestyle
"PL", # pylint
"F841", # unused variable
"F401", # unused imports
"ARG", # unused arguments
]
lint.ignore = [
"E701", # Multiple statements on one line (colon)
Expand Down
1 change: 0 additions & 1 deletion tests/test_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import numpy as np
import pytest

import specsanalyzer
from specsanalyzer import SpecsAnalyzer
from specsanalyzer.convert import calculate_matrix_correction
from specsanalyzer.convert import calculate_polynomial_coef_da
Expand Down
1 change: 0 additions & 1 deletion tests/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import numpy as np
import pytest

import specsscan
from specsscan.core import load_images
from specsscan.core import parse_lut_to_df

Expand Down
1 change: 0 additions & 1 deletion tests/test_lens_modes.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from specsanalyzer import SpecsAnalyzer

test_dir = os.path.dirname(__file__)
# noqa: EF841

lensmodes_angle = [
"LowAngularDispersion",
Expand Down
4 changes: 0 additions & 4 deletions tests/test_specsanalyzer.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
"""This is a code that performs several tests for the SpecsAnalyzer core class functions"""
import importlib.metadata
import os
from importlib.util import find_spec

from specsanalyzer import __version__
from specsanalyzer import SpecsAnalyzer

package_dir = os.path.dirname(find_spec("specsanalyzer").origin)


def test_version():
"""Test if the package has the correct version string."""
Expand Down
5 changes: 2 additions & 3 deletions tests/test_specsscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@
"""
import importlib.metadata
import os
from importlib.util import find_spec

import numpy as np
import pytest
from pynxtools.dataconverter.convert import ValidationFailed

import specsscan
from specsanalyzer.core import create_fft_params
from specsscan import __version__
from specsscan import SpecsScan

package_dir = os.path.dirname(specsscan.__file__)
test_dir = package_dir + "/../../tests/data/"
package_dir = os.path.dirname(find_spec("specsscan").origin)
test_dir = os.path.dirname(__file__)
data_dir = os.fspath(f"{test_dir}/data/")
fft_filter_peaks = create_fft_params(amplitude=1, pos_x=82, pos_y=116, sigma_x=15, sigma_y=23)
Expand Down

0 comments on commit 16aa98e

Please sign in to comment.