fepegar commited on
Commit
4f147ad
·
1 Parent(s): e8ab6bd

Update unit test

Browse files
Files changed (2) hide show
  1. tests/test_custom_config.py +9 -4
  2. uv.lock +1 -1
tests/test_custom_config.py CHANGED
@@ -75,10 +75,15 @@ class TestGetProcessorCustomConfig:
75
  resolved_processor_config: DictConfig,
76
  ) -> None:
77
  """Full processor DictConfig → Processor matching that config."""
78
- # Remove all but the first transform to distinguish from default (5 transforms)
79
- resolved_processor_config.image_transform.transforms = (
80
- resolved_processor_config.image_transform.transforms[:1]
81
- )
 
 
 
 
 
82
  processor = get_processor(
83
  config=resolved_processor_config,
84
  image_only=True,
 
75
  resolved_processor_config: DictConfig,
76
  ) -> None:
77
  """Full processor DictConfig → Processor matching that config."""
78
+ # Remove all but the first transform to distinguish from default (5
79
+ # transforms). The transforms are stored as a named mapping
80
+ # (e.g. {"to_orientation": ..., "resample": ...}), so keep only the
81
+ # first key.
82
+ transforms = resolved_processor_config.image_transform.transforms
83
+ first_key = next(iter(transforms))
84
+ resolved_processor_config.image_transform.transforms = {
85
+ first_key: transforms[first_key]
86
+ }
87
  processor = get_processor(
88
  config=resolved_processor_config,
89
  image_only=True,
uv.lock CHANGED
@@ -271,7 +271,7 @@ wheels = [
271
 
272
  [[package]]
273
  name = "colipri"
274
- version = "0.1.1"
275
  source = { editable = "." }
276
  dependencies = [
277
  { name = "accelerate" },
 
271
 
272
  [[package]]
273
  name = "colipri"
274
+ version = "0.1.2"
275
  source = { editable = "." }
276
  dependencies = [
277
  { name = "accelerate" },