7532e09a39
- Update to 0.31.1: - Format commands with pipelines (using |) now properly fail when any command in the pipeline returns a non-zero exit code (#320). Previously, only the last command's exit code was considered, which could allow formatting to succeed even when intermediate commands failed. - Update to 0.31.0: - BREAKING CHANGE: An exception is now raised when you use external() in files that are not inside your tests/ directory (or any other directory that you can configure with tool.inline-snapshot.test-dir). - Users are now notified if they use the same UUID for multiple external snapshots, which can happen when copying one test as a template for a new test. The snapshots should be reset to an empty external() and recreated with inline-snapshot. - Updated --snapshot flag to --inline-snapshot in session hints. - The lookup for external snapshots has been improved. - Update to 0.30.1: - Disable ensure ascii in json.dump to support non-ASCII characters in external files - Update to 0.30.0: - The test-dir config option can now also be a list of paths - added Python 3.14 support - Update to 0.29.4: - External.run_inline() now uses the same logic as External.run_pytest. - inline-snapshot now supports different Python file encodings and recognizes encoding comments such as # -*- coding: windows-1251 -*-. - Update to 0.29.3: - xdist is now detected properly - Update to 0.29.2: - fixed string formatting with black which caused invalid snapshots assert " a " == snapshot("a")
Matej Cepl2026-01-14 20:44:45 +00:00
4c2a0910d9
Accepting request 1321489 from devel:languages:python
Ana Guerrero2025-12-09 11:46:26 +00:00
116f62a24b
- Only require pytest-subtests with pytest < 9.
Steve Kowalik2025-12-08 04:31:44 +00:00
265a195cdb
Accepting request 1308081 from devel:languages:python
Ana Guerrero2025-09-30 15:48:37 +00:00
f6ef72620e
- Update to 0.29.1: * Added + Added get_snapshot_value() + Added inline_snapshot.extra.Transformed and inline_snapshot.extra.transformation which can be used to transform values inside of snapshots. + exposed @declare_unmanaged which allows you to create your own unmanaged types. + New external() implementation with support for different data formats. + Ability to declare custom external formats with @register_format. + external() can now be used without snapshot(). + Add/fix reproducible standard repr for functions * Changed + You now have to specify test-dir in your pyproject.toml when you save your tests in a folder other than tests/ in your project root. + **BREAKING CHANGE**: You now have to declare format aliases if you used outsource() with a different suffix than .txt or .bin in the past. + Added extra information to the reported failure when snapshots are fixed or created. * Fixed + handle cases where pytest_unconfigure is called but not pytest_configure + pyproject.toml is now also located based on the current directory and the pytest-root. + Terminal with is preserved. + solved incompatibility with pytest_pretty. + external_file() now follows the aliases defined by register_format_alias(). + fixed the representation of empty strings in sub-snapshots from
Steve Kowalik2025-09-30 04:33:45 +00:00
c567dc8a4b
- Update to 0.23.0 * pytest assert rewriting works now together with inline-snapshot if you use cpython>=3.11 * ... is now a special value to create snapshot values. The value change in assert [5,4] == snapshot([5,...]) is now a create (previously it was a fix) * Tests with failed snapshot comparisons now always result in a pytest Error, even if snapshots have been fixed or created. * inline-snapshot uses now --inline-snapshot=disable during CI runs by default * The default flags have changed for cpython >= 3.11 * The categories in the terminal output are now links to the documentation if it is supported by the terminal * You can now use the config option skip-snapshot-updates-for-now to skip the reporting of updates * snapshot updates are now disabled by default. They be enabled with show-updates=true in your config
Markéta Machová2025-05-27 08:48:20 +00:00
5a71c4e30c
Accepting request 1241019 from devel:languages:python
Ana Guerrero2025-01-29 15:09:42 +00:00
9b67e0fe7b
- Inject multibuild to break a build cycle.
Steve Kowalik2025-01-29 02:19:50 +00:00
3704e77bdc
Accepting request 1238877 from devel:languages:python
Ana Guerrero2025-01-20 16:14:31 +00:00
f95e8f253c
- Update to 0.19.3: * Added + added the optional inline-snapshot[dirty-equals] dependency to depend on the dirty-equals version which works in combination with inline-snapshot. + You can now specify which tool you want to use to format your code by setting a format-command in your configuration. + Support for a new storage-dir configuration option, to tell inline-snapshot where to store data files such as external snapshots. + attrs can now contain unmanaged values + inline_snapshot.extra.warns to captures warnings and compares them against expected warnings. + snapshots inside snapshots are now supported. + runtime values can now be part of snapshots. + f-strings can now also be used within snapshots, but are currently not fixed by inline-snapshot. * Changed + BREAKING-CHANGE you have to install inline-snapshot[black] now if you want to format your code like in the previous versions. This option is not required if you use a format-command. + dirty-equals expressions are now treated like runtime values or snapshots within snapshots and are not modified by inline-snapshot. * Fixed + raise no assertion for positional arguments inside constructor methods. + fixed a crash when you changed the snapshot to use a custom constructoro method for dataclass/pydantic models. + snapshots with pydantic models can now be compared multiple times + Load default config values even if [tool.inline-snapshot] is missing. + use '.model_fields' on pydantic model class and not instance. + pydantic v1 is supported again.
Steve Kowalik2025-01-16 05:51:26 +00:00
c1ffa42b4c
Accepting request 1218960 from devel:languages:python
Ana Guerrero2024-10-29 13:36:35 +00:00
aba0f2ff41
- update to 0.13.3: * removed non-optional dirty-equals dependency * star-expressions in list or dicts where never valid and cause a warning now. * A snapshot which contains an dirty-equals expression can now be compared multiple times. * Use tomllib instead of PyPI toml on Python 3.11 and later * added extra.prints * 3.13 support * strings with one line-break at the end become no multiline strings - Enable sle15_python_module_pythons. * add license to project metadata and some other fixes in pyproject.toml (#104)
Dirk Mueller2024-10-29 08:12:58 +00:00
0ef9c37f28
Accepting request 1199478 from devel:languages:python
Ana Guerrero2024-09-10 19:13:04 +00:00