Skip to content

Commit

Permalink
Populate files in resources/fake_repository
Browse files Browse the repository at this point in the history
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
  • Loading branch information
carmenbianca committed Sep 6, 2024
1 parent 5bba598 commit f7f6586
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 22 deletions.
19 changes: 0 additions & 19 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,25 +167,6 @@ def fake_repository(tmpdir_factory) -> Path:
# Get rid of those pesky pyc files.
shutil.rmtree(directory / "src/__pycache__", ignore_errors=True)

# Adding this here to avoid conflict in main project.
(directory / "src/exception.py").write_text(
"SPDX-FileCopyrightText: 2017 Jane Doe\n"
"SPDX-License-Identifier: GPL-3.0-or-later WITH Autoconf-exception-3.0",
encoding="utf-8",
)
(directory / "src/custom.py").write_text(
"SPDX-FileCopyrightText: 2017 Jane Doe\n"
"SPDX-License-Identifier: LicenseRef-custom",
encoding="utf-8",
)
(directory / "src/multiple_licenses.rs").write_text(
"SPDX-FileCopyrightText: 2022 Jane Doe\n"
"SPDX-License-Identifier: GPL-3.0-or-later\n"
"SPDX-License-Identifier: Apache-2.0 OR CC0-1.0"
" WITH Autoconf-exception-3.0\n",
encoding="utf-8",
)

os.chdir(directory)
return directory

Expand Down
4 changes: 3 additions & 1 deletion tests/resources/fake_repository/src/custom.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# This file is overridden by the fake_repository fixture.
# SPDX-FileCopyrightText: 2017 Jane Doe
#
# SPDX-License-Identifier: LicenseRef-custom
4 changes: 3 additions & 1 deletion tests/resources/fake_repository/src/exception.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# This file is overridden by the fake_repository fixture.
# SPDX-FileCopyrightText: 2017 Jane Doe
#
# SPDX-License-Identifier: GPL-3.0-or-later WITH Autoconf-exception-3.0
4 changes: 3 additions & 1 deletion tests/resources/fake_repository/src/multiple_licenses.rs
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
// This file is overridden by the fake_repository fixture.
// SPDX-FileCopyrightText: 2022 Jane Doe
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-License-Identifier: Apache-2.0 OR CC0-1.0 WITH Autoconf-exception-3.0

0 comments on commit f7f6586

Please sign in to comment.