criação de testes unitários

This commit is contained in:
2025-04-18 12:34:17 +01:00
parent 625e667d21
commit 4be673ff2d
4 changed files with 15 additions and 0 deletions

0
tests/__init__py Normal file
View File

0
tests/test_copier.py Normal file
View File

15
tests/test_organizer.py Normal file
View File

@ -0,0 +1,15 @@
import unittest
from organizer import categorizar_por_tipo
from pathlib import Path
class TestOrganizer(unittest.TestCase):
def test_categorizar_por_tipo(self):
self.assertEqual(categorizar_por_tipo("imagem.jpg"), "imagem")
self.assertEqual(categorizar_por_tipo("documento.pdf"), "documento")
self.assertEqual(categorizar_por_tipo("video.mp4"), "video")
self.assertEqual(categorizar_por_tipo("ficheiro.zip"), "outro")
if __name__ == "__main__":
unittest.main()

0
tests/test_scanner.py Normal file
View File