Files
anb_python_components/tests/classes/directory_test.py
2025-10-09 23:25:32 +03:00

19 lines
782 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# directory_test.py
import unittest
from anb_python_components.classes.directory import Directory
class DirectoryTest(unittest.TestCase):
def test_is_exists (self):
self.assertTrue(Directory.is_exists(r"C:\Windows", "r"))
self.assertFalse(Directory.is_exists(r"C:\Windows\1", "rw"))
# Создайте поддиректорию 123 в директории теста и заполните ее содержимым
self.assertTrue(Directory.is_exists(r".\123", "rwx"))
def test_remove (self):
# Создайте поддиректорию 123 в директории теста и заполните ее содержимым
self.assertTrue(Directory.remove(r".\123"))
if __name__ == '__main__':
unittest.main()