tests.test_file_ops moduleΒΆ

Tests for repomatic.file_ops: how a file lands on disk.

tests.test_file_ops.test_normalize_text(text, expected)[source]ΒΆ

Trailing whitespace collapses to one newline.

Return type:

None

tests.test_file_ops.test_generated_header_names_the_command_and_version()[source]ΒΆ

The first line names the command and the running version.

Return type:

None

tests.test_file_ops.test_strip_generated_header_round_trip(body)[source]ΒΆ

Stripping the stamp returns the body that followed it.

Return type:

None

tests.test_file_ops.test_strip_generated_header_keeps_an_unstamped_file()[source]ΒΆ

A file without the stamp comes back whole.

Return type:

None

tests.test_file_ops.test_write_if_changed_trusts_previous(tmp_path)[source]ΒΆ

A previous equal to the content skips the write, without a read.

Return type:

None