Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion capturando erros unittest
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Rafael Novello  
View profile   Translate to Translated (View Original)
 More options Nov 12 2012, 6:53 pm
From: Rafael Novello <rafa.reis.nove...@gmail.com>
Date: Mon, 12 Nov 2012 21:53:04 -0200
Local: Mon, Nov 12 2012 6:53 pm
Subject: Re: [python-brasil] capturando erros unittest

Diego, tudo bem?

Fiquei curioso para saber porque você gostaria de fazer isso. Não consegui
imaginar qual a utilidade.

O que você pode fazer é registrar isso em log e gravar em um arquivo, como
um webserver faz, mas não sei se isso ajuda.

Uma coisa mais comum é verificar se uma determinada função ou método
levanta uma exceção nos testes de unidade, com o assertRaises. Será que
isso ajuda?

Um abraço!
Atenciosamente,
Rafael Novello.

Twitter: @rafa_novello
Blog: http://rafanovello.wordpress.com/

Em 12 de novembro de 2012 14:56, Diego Tostes <tostes.pyt...@gmail.com>escreveu:

> Pessoal,

> Existe uma forma de setar uma variável com uma lista de erros usando
> o unittest?

> eu gostaria de persistir o erros, mas até agora só consegui printar na
> tela os erros usando unittest.main().

> meu codigo esta nesse link: http://paste.ideaslabs.com/show/9cedddVHXr

> abs

> Diego

>  --
> ------------------------------------
> Grupo Python-Brasil
> http://www.python.org.br/wiki/AntesDePerguntar

> <*> Para visitar o site do grupo na web, acesse:
> http://groups.google.com/group/python-brasil

> <*> Para sair deste grupo, envie um e-mail para:
> python-brasil+unsubscribe@googlegroups.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.