Skip to content

Commit

Permalink
Remove addheader test
Browse files Browse the repository at this point in the history
Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
  • Loading branch information
carmenbianca committed Oct 24, 2023
1 parent 3e80971 commit a5573d0
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions tests/test_main_annotate.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,36 +52,6 @@ def test_annotate_simple(fake_repository, stringio, mock_date_today):
assert simple_file.read_text() == expected


def test_addheader_simple(fake_repository, stringio, mock_date_today):
"""Add a header to a file that does not have one."""
simple_file = fake_repository / "foo.py"
simple_file.write_text("pass")
expected = cleandoc(
"""
# SPDX-FileCopyrightText: 2018 Jane Doe
#
# SPDX-License-Identifier: GPL-3.0-or-later
pass
"""
)

result = main(
[
"addheader",
"--license",
"GPL-3.0-or-later",
"--copyright",
"Jane Doe",
"foo.py",
],
out=stringio,
)

assert result == 0
assert simple_file.read_text() == expected


def test_annotate_simple_no_replace(fake_repository, stringio, mock_date_today):
"""Add a header to a file without replacing the existing header."""
simple_file = fake_repository / "foo.py"
Expand Down

0 comments on commit a5573d0

Please sign in to comment.