Skip to content

Commit

Permalink
chore: fix naming of sample data for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
davhofer committed Sep 11, 2024
1 parent 806e7e6 commit df258ae
Show file tree
Hide file tree
Showing 125 changed files with 13 additions and 3,786 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,5 @@ addopts = [
"--showlocals",
"--strict-markers",
"--strict-config",
"--ignore=tests/test_data/",
]
testpaths = ["tests"]
File renamed without changes.
Binary file added tests/sample_data/sample_archive.tar.gz
Binary file not shown.
File renamed without changes.
2 changes: 2 additions & 0 deletions tests/sample_data/sample_repo/repo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
repo:
namespace: "sample_repo"
2 changes: 1 addition & 1 deletion tests/test_cmake_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ def test_convert_add_subdirectory(add_subdirectory: ast.Command, expected: str |


def test_convert_cmake_dependencies():
with pathlib.Path("tests/test_data/CMakeLists.txt").open() as f:
with pathlib.Path("tests/sample_data/CMakeLists.txt").open() as f:
data = f.read()

expected_subdirectories = {
Expand Down
4 changes: 2 additions & 2 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def test_write_package_to_repo():
pkg = core.SpackPyPkg()
pkg.name = "generated-test-pkg"

repo = pathlib.Path("tests/test_data/test_repo")
repo = pathlib.Path("tests/sample_data/sample_repo")

assert core._write_package_to_repo(pkg, repo)

Expand Down Expand Up @@ -277,7 +277,7 @@ def test_write_package_to_repo():
def test_convert_package_writes_file(package: str) -> None:
"""Test end-to-end conversion of black package."""
cwd = pathlib.Path.cwd()
repo = cwd / "tests" / "test_data" / "test_repo"
repo = cwd / "tests" / "sample_data" / "sample_repo"

core.convert_package(
package, max_conversions=1, versions_per_package=5, repo=str(repo), allow_duplicate=True
Expand Down
91 changes: 0 additions & 91 deletions tests/test_data/black/package.py

This file was deleted.

262 changes: 0 additions & 262 deletions tests/test_data/black/pyproject23.12.0.toml

This file was deleted.

Loading

0 comments on commit df258ae

Please sign in to comment.