Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 4, 2024
1 parent b8ca5d4 commit ccc6edd
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions tests/test_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,12 +461,12 @@ def test_step_run_crds_values(step_class):
step = step_class()
step.process = lambda *args: None

assert step.str1 == 'default'
assert step._initialized['str1'] is False
assert step.str1 == "default"
assert step._initialized["str1"] is False

step.run("science.fits")
assert step.str1 == 'from config'
assert step._initialized['str1'] is True
assert step.str1 == "from config"
assert step._initialized["str1"] is True


@pytest.mark.usefixtures("_mock_crds_reffile")
Expand All @@ -476,12 +476,12 @@ def test_step_run_keyword_values(step_class):
step = step_class()
step.process = lambda *args: None

assert step.str1 == 'default'
assert step._initialized['str1'] is False
assert step.str1 == "default"
assert step._initialized["str1"] is False

step.run("science.fits", str1='from keywords')
assert step.str1 == 'from keywords'
assert step._initialized['str1'] is True
step.run("science.fits", str1="from keywords")
assert step.str1 == "from keywords"
assert step._initialized["str1"] is True


@pytest.mark.usefixtures("_mock_crds_reffile")
Expand All @@ -491,10 +491,10 @@ def test_pipe_run_step_values():
step.process = lambda *args: None

# Step parameters are initialized when created via the pipeline
assert step.step1.str1 == 'default'
assert step.step1._initialized['str1'] is True
assert step.step1.str1 == "default"
assert step.step1._initialized["str1"] is True

# Parameters in a step dictionary can still override them
step.run("science.fits", steps={'step1': {'str1': 'from steps'}})
assert step.step1.str1 == 'from steps'
assert step.step1._initialized['str1'] is True
step.run("science.fits", steps={"step1": {"str1": "from steps"}})
assert step.step1.str1 == "from steps"
assert step.step1._initialized["str1"] is True

0 comments on commit ccc6edd

Please sign in to comment.