This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from __future__ import absolute_import, unicode_literals | |
| import os | |
| from celery import Celery | |
| from django.conf import settings | |
| from robot.config import ROBOT_CELERY_BEAT_SCHEDULE | |
| os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'test.settings') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class SomaTestCase { | |
| @Test | |
| fun `soma() returns value correctly`() { | |
| val (a, b) = Pair(1, 2) | |
| val result = soma(a, b) | |
| assertThat(result).isEqual(3) | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def soma(a, b): | |
| try: | |
| return a + b | |
| except TypeError: | |
| print("Não é possível somar {} com {}".format(a, b)) | |
| sucesso = soma(1, 2) | |
| print(sucesso) | |
| >>> 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fun soma(a: Int, b: Int): Int { | |
| return a + b | |
| } | |
| val variavel = soma(1, 2) |