Coder Social home page Coder Social logo

pet_kare's Introduction

M5 - Pet Kare

Como rodar os testes localmente

  • Verifique se os pacotes pytest e/ou pytest-testdox estão instalados globalmente em seu sistema:
pip list
  • Caso seja listado o pytest e/ou pytest-testdox e/ou pytest-django em seu ambiente global, utilize os seguintes comando para desinstalá-los globalmente:
pip uninstall pytest pytest-testdox -y

Próximos passos:

1 Crie seu ambiente virtual:

python -m venv venv

2 Ative seu venv:

# linux:
source venv/bin/activate

# windows (powershell):
.\venv\Scripts\activate

# windows (git bash):
source venv/Scripts/activate

3 Instalar o pacote pytest-testdox:

pip install pytest-testdox pytest-django

4 Rodar os testes referentes a cada tarefa isoladamente:

Exemplo:

  • Tarefa 1
pytest --testdox -vvs tests/tarefas/tarefa_1/
  • Tarefa 2
pytest --testdox -vvs tests/tarefas/tarefa_2/
  • Tarefa 3
pytest --testdox -vvs tests/tarefas/tarefa_3/

Você também pode rodar cada método de teste isoladamente seguindo uma substring, adicionando a flag -k seguido da substring a ser encontrada (atenção, se o pytest achar multiplos métodos que contenham a mesma substring em seu nome, ele executará todos):

pytest --testdox -vvsk test_can_not_create_pet_when_missing_keys

Você também pode rodar cada método de teste isoladamente:

pytest --testdox -vvs caminho/para/o/arquivo/de/teste::NomeDaClasse::nome_do_metodo_de_teste

Exemplo: executar somente "test_can_get_product_by_id".

pytest --testdox -vvs tests/tarefas/tarefa_1/test_get_product_by_id.py::TestGetProductById::test_can_get_product_by_id

pet_kare's People

Contributors

vinisooo avatar kenzie-chrystian avatar gustavo-kenzie avatar caiquefcavalheiro avatar caique-ferreira avatar lucira avatar

Watchers

 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.