Skip to content

Commit

Permalink
fix correct superclass for IDir (#356)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattrasmus authored Apr 16, 2024
1 parent 37df29f commit 132bcf1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions redun/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -1677,7 +1677,7 @@ class IStagingFile(StagingFile):
classes = IFileClasses()


class IStagingDir(Staging[Dir]):
class IStagingDir(StagingDir):
type_basename = "IStagingDir"
type_name = "redun.IStagingDir"
classes = IFileClasses()
Expand Down Expand Up @@ -1738,7 +1738,7 @@ class ContentStagingFile(StagingFile):
classes = ContentFileClasses()


class ContentStagingDir(Staging[Dir]):
class ContentStagingDir(StagingDir):
type_basename = "ContentStagingDir"
type_name = "redun.ContentStagingDir"
classes = ContentFileClasses()
Expand Down
5 changes: 5 additions & 0 deletions redun/tests/test_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -1017,6 +1017,11 @@ def test_ifile_classes() -> None:
IFile("dir/b").touch()
assert all(isinstance(file, IFile) for file in IDir("dir"))

assert IFile("dir/a").stage("a").render_stage() == "cp dir/a a"
assert IFile("dir/a").stage("a").render_unstage() == "cp a dir/a"
assert IDir("dir").stage("dir2").render_stage() == "cp -r dir dir2"
assert IDir("dir").stage("dir2").render_unstage() == "cp -r dir2 dir"


@use_tempdir
def test_content_file() -> None:
Expand Down

0 comments on commit 132bcf1

Please sign in to comment.