File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ UNRELEASED
55
66* Python 3.12 and 3.13 are now officially supported.
77* Python 3.8 (EOL) is no longer supported.
8+ * `#184 <https://github.com/ESSS/pytest-regressions/pull/184 >`__: Added ``fullpath `` parameter to ``image_regression.check ``.
89
910
10112.6.0
Original file line number Diff line number Diff line change @@ -137,6 +137,7 @@ def check(
137137 diff_threshold : float = 0.1 ,
138138 expect_equal : bool = True ,
139139 basename : Optional [str ] = None ,
140+ fullpath : Optional ["os.PathLike[str]" ] = None ,
140141 ) -> None :
141142 """
142143 Checks that the given image contents are comparable with the ones stored in the data directory.
@@ -148,6 +149,11 @@ def check(
148149 image should be considered different at least above the threshold.
149150 :param diff_threshold:
150151 Tolerance as a percentage (1 to 100) on how the images are allowed to differ.
152+ :param fullpath: complete path to use as a reference file. This option
153+ will ignore ``datadir`` fixture when reading *expected* files but will still use it to
154+ write *obtained* files. Useful if a reference file is located in the session data dir for example.
155+
156+ ``basename`` and ``fullpath`` are exclusive.
151157 """
152158 __tracebackhide__ = True
153159
@@ -172,6 +178,7 @@ def dump_fn(target: Path) -> None:
172178 dump_fn = dump_fn ,
173179 extension = ".png" ,
174180 basename = basename ,
181+ fullpath = fullpath ,
175182 force_regen = self .force_regen ,
176183 with_test_class_names = self .with_test_class_names ,
177184 )
You can’t perform that action at this time.
0 commit comments