Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing the redundant file introduced #9

Merged
merged 2 commits into from
Oct 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 5 additions & 4 deletions fs/tests/test_mkdir.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os.path
import pytest
import fs
import unittest

Expand All @@ -15,6 +16,7 @@ def test_mkdir():
fs.mkdir(path)

assert os.path.exists(path) is True
os.rmdir(path)

def test_mkdir_recursive():

Expand All @@ -27,6 +29,7 @@ def test_mkdir_recursive():
fs.mkdir(path)

assert os.path.exists(path) is True
os.removedirs(path)

def test_mkdir_recursive_fail():

Expand All @@ -36,7 +39,5 @@ def test_mkdir_recursive_fail():
if (os.path.exists(path)):
raise ValueError("Directory %s already exists!" % path)

try:
fs.mkdir(path, recursive=False)
except FileNotFoundError:
pass
with pytest.raises(FileNotFoundError):
fs.mkdir(path, recursive=False)
4 changes: 3 additions & 1 deletion fs/tests/test_rename.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def test_rename_file():
fs.rename(TEST_FILE, rename_file)

assert os.path.exists(rename_file) is True
os.remove(rename_file)

def test_rename_directory():

Expand All @@ -25,4 +26,5 @@ def test_rename_directory():

fs.rename(TEST_DIR_2, rename_dir)

assert os.path.exists(rename_dir) is True
assert os.path.exists(rename_dir) is True
os.rmdir(rename_dir)
3 changes: 3 additions & 0 deletions fs/tests/test_touch.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ def test_touch_on_new_file():

assert os.path.exists(new_file) is True

os.remove(new_file)


@pytest.mark.skipif(os.name == "nt", reason="does not work on windows")
def test_touch_on_directory():

Expand Down