Giter VIP home page Giter VIP logo

sorted_methods_in_python's Introduction

Sorted methods - Python

Neste repositório você encontrará algoritimos de ordenação em Python, utilizando juntamente, testes unitários

Unittest

O unittest é um framework muito utilizado para testes de implementações em python (principalmente).
Sua principal característica é gerir com segurança e ponticidade os testes e seus respectivos resultados a serem esperados.

Sua estrutura base segue o padrão:

 import unittest

class TestStringMethods(unittest.TestCase):

 def test_upper(self):
    self.assertEqual('foo'.upper(), 'FOO')

 def test_isupper(self):
    self.assertTrue('FOO'.isupper())
    self.assertFalse('Foo'.isupper())

if __name__ == '__main__':
unittest.main()

Onde cada def realiza um teste, ordenado por uma função com a extensão unittest.TestCase de testes de caixa!
Para saber mais sobre o unittest framework, acesse a doc:

Documentação do Unittest


Detalhes:

O repositório contem todos os tipos de algoritimos de ordenação ccada um com duas versões exemplificativas

  • Utilizando o método sort do python
  • Utilizando um algoritimo de ordenação escolhido (sem o sort metodo nativo do py)

Estrutura das pastas 📁 :

Pasta Root: My test { 

Dentro da pasta root, há pastas com nomes dos algoritimos de sort utilizado {

   Ao selecionar sua opção, dentro de cada uma, há mais duas subpasta, as quais divide os algoritimos em questão de acordo com a utilização do método nativo sort ou sem sua utilização (with sort ou without sort) {
   
       Dentro de cada subpasta temos dois arquivos, os quais são respectivamente os arquivos de teste e implementação do algoritimo
       
       }
    }
}

Se você gostou do conteúdo, compartilhe!

Reddit Discord Facebook Telegram Twitter



In this repository you will find sorting algorithms in Python, with unit tests .

Unittest

Unittest is a framework widely used for testing Python implementations (mainly).
Its main characteristic is to safely and promptly manage the tests and their respective expected results.

Its base structure follows the standard:

 import unittest

class TestStringMethods(unittest.TestCase):

 def test_upper(self):
    self.assertEqual('foo'.upper(), 'FOO')

 def test_isupper(self):
    self.assertTrue('FOO'.isupper())
    self.assertFalse('Foo'.isupper())

if __name__ == '__main__':
unittest.main()

Where each def performs a test, ordered by a function with the unittest.TestCase extension of box tests!
To learn more about the unittest framework, access the doc:

Unittest documentation


Details:

The repository contains two example versions,

  • Using python's sort method
  • Using a sorting algorithm (without py's native sorting method)

Folders structures 📁 :

Root folder: My test {

Inside the root folder, there are folders named after the sort algorithm used {

   Within each one, there are two more subfolders, which divides the algorithms in question, according to whether sort method is used or not (with sort or without sort) {
   
       Within each subfolder we have two files, which are respectively the test and implementation files of the algorithm
       
       }
    }
}

Warning: The content was written in portuguese(Brazil), and do not support for other languages - (variables and functions name)


If you liked this content, share it!

Reddit Discord Facebook Telegram Twitter

sorted_methods_in_python's People

Contributors

macksonmesquita avatar

Stargazers

Gabriel Almeida Alves  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.