Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

TestOsOpsCommon is added [generic os_ops tests]#231

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
11 commits
Select commitHold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
TestOsOpsCommon::test_touch is added
  • Loading branch information
@dmitry-lipetsk
dmitry-lipetsk committedApr 2, 2025
commit1716e7c37404780d369c72a895adac3e9391dd6c
16 changes: 16 additions & 0 deletionstests/test_os_ops_common.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -632,3 +632,19 @@ def test_write(self, write_data001: tagWriteData001, os_ops: OsOperations):
s = tmp_file.read()

assert s == write_data001.result

def test_touch(self, os_ops: OsOperations):
"""
Test touch for creating a new file or updating access and modification times of an existing file.
"""
assert isinstance(os_ops, OsOperations)

filename = os_ops.mkstemp()

# TODO: this test does not check the result of 'touch' command!

os_ops.touch(filename)

assert os_ops.isfile(filename)

os_ops.remove_file(filename)
10 changes: 0 additions & 10 deletionstests/test_remote.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -72,13 +72,3 @@ def test_get_file_size__unk_file(self):
assert "Utility exited with non-zero code (1)." in str(x.value)
assert "No such file or directory" in str(x.value)
assert "/dummy" in str(x.value)

def test_touch(self):
"""
Test touch for creating a new file or updating access and modification times of an existing file.
"""
filename = "/tmp/test_file.txt"

self.operations.touch(filename)

assert self.operations.isfile(filename)

[8]ページ先頭

©2009-2025 Movatter.jp