Ahora que has mejorado tus habilidades en python, ¿cómo probarlas? Muy simple, hoy quiero mostrarte como probar tus módulos y paquetes que desarrollas en tu tiempo libre o en el trabajo.
Testear módulos de python puede hacerse fácilmente con el módulo unittest. Con este módulo (y el tuyo), puedes explorar cuánto de bueno es tu código. [...]
Archive for February, 2008
Testeando tus propios módulos python
Posted in Modulos, Python, Testing on 7 February, 2008 | 2 Comments »
Testing Python Modules (Part I)
Posted in Modules, Python, Testing on 6 February, 2008 | Leave a Comment »
Now, you’re python skills could be improved, but how can you test it? Very simple, today I want to show you how to test modules and packages that you develop in your spare time or work time.
Testing in python can be made by the powerful unittest module. With this module (and yours), you can explore [...]
Threads (Parte II)
Posted in Uncategorized on 5 February, 2008 | Leave a Comment »
Si sientes que los ejemplos de Threads (Part I) se te quedan pequeños, hoy te traigo un mejor ejemplo (y bien conocido). Se trata del productor-consumidor . Este ejemplo, para quien no lo conozca, está basado en dos actores, uno que produce algo (números en este caso) y otro que los consume. Es una [...]
Threads (Part II)
Posted in Python, Threads on 4 February, 2008 | Leave a Comment »
If you feel that examples of threads from Threads (Part I) isn’t too complex for you, today I bring you a better example (and well known). The producer-consumer example . This example, for the people that don’t know the case, is based in two actors, one that produces something (numbers in this case) and [...]
Threads y decoradores (para thread-safety)
Posted in Python, Threads on 2 February, 2008 | Leave a Comment »
Hoy aprenderás cómo los decoradores pueden hacer tu vida más fácil cuando manejas threads. Cualquiera que haya usado threads ha tenido que pelearse con sus problemas. Uno de los más importantes son las condiciones de carrera (race-conditions). Pero con los decoradores, esto puede ser fácilmente eliminado. Vamos a ver un ejemplo de código.
from threading import [...]
Threads and decorators (for thread-safety)
Posted in Python, Threads on 1 February, 2008 | Leave a Comment »
Hi all, in this post you’ll learn how decorators can make your life easier when dealing with threads. Anyone that has experience with threads also have experience with its troubles. One of the most important troubles with threads are race-conditions. But with decorators, this can be easily throw away. Let’s look to an example of [...]