File: test_auto_background.py

package info (click to toggle)
python-xypattern 1.1.2-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 348 kB
  • sloc: python: 1,050; makefile: 4
file content (12 lines) | stat: -rw-r--r-- 329 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
import pytest
from xypattern.auto_background import SmoothBrucknerBackground


def test_transform_x():
    bkg = SmoothBrucknerBackground()

    assert bkg.smooth_width == 0.1
    bkg.transform_x(lambda x: x**2)
    assert bkg.smooth_width == pytest.approx(0.1**2)
    assert bkg.iterations == 50
    assert bkg.cheb_order == 50