generated from aboutmydreams/quick-pylib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add get_files_in_directory test
- Loading branch information
1 parent
b3efee2
commit 803f9dc
Showing
3 changed files
with
10 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
|
||
setuptools.setup( | ||
name="way3", | ||
version="0.0.20", | ||
version="0.0.21", | ||
author="aboutmydreams", | ||
author_email="[email protected]", | ||
description="Simplified file path management for Python developers", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
from way3 import get_current_dir | ||
from way3 import get_current_dir, get_files_in_directory | ||
|
||
import unittest | ||
|
||
|
||
class TestFileFind(unittest.TestCase): | ||
def test_result(self): | ||
result = get_current_dir(__file__) | ||
print(result) | ||
self.assertIn("way3/tests", result, "result fail: expected file") | ||
|
||
def test_get_files_in_directory(self): | ||
current_directory = "tests" # 当前目录 | ||
files = get_files_in_directory(current_directory) | ||
self.assertIn( | ||
"tests/test_file_find.py", files, "result fail: expected test_file_find.py" | ||
) | ||
self.assertEqual(len(files) > 1, True, "result fail: expected > 3") |