criação de testes unitários
This commit is contained in:
0
tests/__init__py
Normal file
0
tests/__init__py
Normal file
0
tests/test_copier.py
Normal file
0
tests/test_copier.py
Normal file
15
tests/test_organizer.py
Normal file
15
tests/test_organizer.py
Normal 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
0
tests/test_scanner.py
Normal file
Reference in New Issue
Block a user