Giter VIP home page Giter VIP logo

tests-python's Introduction

Tests en Python

Build Status

Clase de prueba para enseñar a hacer tests en Python.

Instalando lo necesario

pip install -r requirements.txt

Para ejecutar los tests

pytest

Para ejecutar

python3 hugitos.py

o

hug -f hugitos.py

Usando docker

Primero (o cuando se quiera) se construye y ejecuta el volumen de datos en data

A continuación

sudo docker build -t minick/mitag .

El volumen "de datos" tiene que ejecutarse también para poder usarse:

sudo docker run -d -it --rm jjmerelo/datos sh

(-d es para ejecutar en background, y se ejecuta sh para que haya un proceso ejecutándose todo el tiempo).

Para saber cual es el nombre del contenedor, se ejecuta sudo docker ps. La primera columna da un CONTAINER ID y la última un NAME. Para montar ese contenedor de datos desde otro contenedor "ejecutable" habrá que hacer

sudo docker run -it --rm -p 8000:80 --volumes-from curious_name jjmerelo/hugitos

Donde curious_name es el nombre que aparece, para ese contenedor en ejecución, en la columna NAME. También se pueden usar los primeros números del CONTAINER IDde la primera columna.

-rm es necesario para que se borre una vez ejecutado, -it para que se ejecute el terminal y salga el log y -p 80:8000 es un mapping del puerto del contenedor (80) al del host local (8000). --volumes-from hitos monta el volumen que exporta el contenedor hitos.

Se encuentra alojado en Docker Hub

Prueba

Despliegue: https://iv-2017.herokuapp.com/ Contenedor: https://tests-python-syboghyvul.now.sh

tests-python's People

Contributors

jj avatar antonioalcm avatar

Watchers

James Cloos avatar Luis Balderas Ruiz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.