Like [`round_trip`] but configure the [`Generator`] with the requested `indentation`, `line_ending` and `unparse_mode` settings.
(
indentation: &Indentation,
line_ending: LineEnding,
unparse_mode: UnparseMode,
contents: &str,
)
| 1644 | /// Like [`round_trip`] but configure the [`Generator`] with the requested |
| 1645 | /// `indentation`, `line_ending` and `unparse_mode` settings. |
| 1646 | fn round_trip_with( |
| 1647 | indentation: &Indentation, |
| 1648 | line_ending: LineEnding, |
| 1649 | unparse_mode: UnparseMode, |
| 1650 | contents: &str, |
| 1651 | ) -> String { |
| 1652 | let module = parse_module(contents).unwrap(); |
| 1653 | let mut generator = Generator::new(indentation, line_ending).with_mode(unparse_mode); |
| 1654 | generator.unparse_suite(module.suite()); |
| 1655 | generator.generate() |
| 1656 | } |
| 1657 | |
| 1658 | fn jupyter_round_trip(contents: &str) -> String { |
| 1659 | let indentation = Indentation::default(); |
no test coverage detected