Skip to content

Commit

Permalink
arquivos de teste dos algoritimos
Browse files Browse the repository at this point in the history
  • Loading branch information
victorcamaraa authored Sep 3, 2024
1 parent 5c6413a commit 6765f86
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 0 deletions.
10 changes: 10 additions & 0 deletions web/Bases web/jsons/_test_compras_automatico.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import pytest
from compras_automatico import fetch_and_process_data

def test_process_gazettes_execution():
try:
fetch_and_process_data('2024-01-01', '2024-01-02')
assert True # Se não houver exceções, o teste passa
except Exception as e:
pytest.fail(f"process_gazettes falhou com a exceção: {e}")

10 changes: 10 additions & 0 deletions web/Bases web/jsons/_test_convenio_automatico.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import pytest
from convenio_automatico import process_gazettes

def test_process_gazettes_execution():
try:
process_gazettes()
assert True # Se não houver exceções, o teste passa
except Exception as e:
pytest.fail(f"process_gazettes falhou com a exceção: {e}")

10 changes: 10 additions & 0 deletions web/Bases web/jsons/_test_credito_automatico.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import pytest
from credito_automatico import process_gazettes

def test_process_gazettes_execution():
try:
process_gazettes()
assert True # Se não houver exceções, o teste passa
except Exception as e:
pytest.fail(f"process_gazettes falhou com a exceção: {e}")

13 changes: 13 additions & 0 deletions web/Bases web/jsons/_test_licitacoes_automatico.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import pytest
import os

# Caminho do script a ser testado
script_path = os.path.join(os.path.dirname(__file__), 'licitacoes_automatico.py')

def test_script_execution():
try:
# Executa o script como um módulo para garantir que ele não gera exceções
exec(open(script_path).read())
assert True # Se não houver exceções, o teste passa
except Exception as e:
pytest.fail(f"O script falhou com a exceção: {e}")
13 changes: 13 additions & 0 deletions web/Bases web/jsons/_test_verbas_automatico.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import pytest
import os

# Caminho do script a ser testado
script_path = os.path.join(os.path.dirname(__file__), 'verbas_automatico.py')

def test_script_execution():
try:
# Executa o script como um módulo para garantir que ele não gera exceções
exec(open(script_path).read())
assert True # Se não houver exceções, o teste passa
except Exception as e:
pytest.fail(f"O script falhou com a exceção: {e}")

0 comments on commit 6765f86

Please sign in to comment.