Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload tests #1753

Merged
merged 10 commits into from
Jan 16, 2025
Merged

Upload tests #1753

merged 10 commits into from
Jan 16, 2025

Conversation

isabelmeister
Copy link
Collaborator

@isabelmeister isabelmeister commented Jan 13, 2025

PR com os ajustes que o @aspeddro comentou
Code coverage até agora: (13/01/2025 18:30)
image
Code Coverage até agora: (14/01/2023 02:13)
image

Coverage final:
image

@isabelmeister isabelmeister self-assigned this Jan 13, 2025
@isabelmeister isabelmeister marked this pull request as ready for review January 16, 2025 08:09
@isabelmeister isabelmeister merged commit f5447da into master Jan 16, 2025
4 checks passed
@isabelmeister isabelmeister deleted the more-upload-tests branch January 16, 2025 14:57
Copy link
Collaborator

@aspeddro aspeddro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parece ótimo!!

Deixei alguns comentários e dúvidas.

"""
dataset = Dataset(dataset_id="1")

dataset.create(if_exists="raise")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aqui tenta capturar o erro usando pytest.raises

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
Não consegui reproduzir o erro com o pytest.raises 👎
Resultado pra ambos foi None, tanto o tipo de erro como o retorno
Captura de tela de 2025-01-17 15-11-22
image

Comment on lines +43 to +45
assert [
"ano,id_municipio,pib,impostos_liquidos,va,va_agropecuaria,va_industria,va_servicos,va_adespss"
] == cols
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Porque aqui a lista tem apenas uma string?

Copy link
Collaborator Author

@isabelmeister isabelmeister Jan 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ajustar
"Colocar uma vírgula no csv_delimiter que o retorno se torna ['ano', 'id_municipio', 'pib', 'impostos_liquidos', 'va', 'va_agropecuaria', 'va_industria', 'va_servicos', 'va_adespss']"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

CSV_DELIMITER é um parâmetro obrigatório mesmo não sendo formato *.csv

Comment on lines +49 to +56
# def test_load_schema_from_api():
# """
# Test if return the schema
# """
# out = table._load_schema_from_api('staging') ## IndexError: list index out of range (backend.py:437)
# ## WARNING | _load_schema_from_api:143 - Table pytest allready exists, replacing schema!
#
# assert isinstance(out, list)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acho que pode remover esse testes comentado

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ajustar
usar pytest.mark.skip(reason=' ')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants