Commit 73157d49 authored by Zhang, Chen's avatar Zhang, Chen
Browse files

fix unit test in rotation

parent df9ec4b9
Loading
Loading
Loading
Loading
+8 −10
Original line number Diff line number Diff line
@@ -23,9 +23,6 @@ requires = [
]
build-backend = "setuptools.build_meta"

[tool.black]
line-length = 119

[tool.versioningit.vcs]
method = "git"
default-tag = "1.0.0"
@@ -52,14 +49,13 @@ exclude = ["tests*", "scripts*", "docs*", "notebooks*"]
pythonpath = [".", "src", "scripts"]
testpaths = ["tests"]
python_files = ["test*.py"]
norecursedirs = [".git", "tmp*", "_tmp*", "__pycache__", "*dataset*", "*data_set*"]
norecursedirs = [
  ".git", "tmp*", "_tmp*", "__pycache__",
  "*dataset*", "*data_set*",
  "*ui*"
  ]
markers = ["datarepo: mark a test as using imars3d-data repository"]

[tool.flake8]
ignore = "E203, E266, E501, E731, W503"
exclude = ["conda.recipe/meta.yaml"]
max-line-length = 120

[tool.pylint]
max-line-length = 120
disable = ["too-many-locals",
@@ -70,7 +66,9 @@ disable = ["too-many-locals",
]

[tool.coverage.run]
source = "src/imars3d"
source = [
  "src/imars3d/backend"
]
omit = [
  "*/tests/*",
  "src/imars3d/__init__.py",
+1 −1
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ def test_differrent_centers(center_ref):
    # this is using default number of pairs (1)
    center_calc = find_rotation_center(arrays=projs, angles=OMEGAS, in_degrees=False)
    # with atol
    center_calc2 = find_rotation_center(arrays=projs, angles=OMEGAS, in_degrees=False, atol=0.5)
    center_calc2 = find_rotation_center(arrays=projs, angles=OMEGAS, in_degrees=False, atol_deg=0.5)
    # verify
    # NOTE:
    # answer within the same pixel should be sufficient for most cases