Skip to content
Snippets Groups Projects
Commit 4aa3a4ec authored by Anton Hansson's avatar Anton Hansson :ghost:
Browse files

Update tests/test_router.py, .gitlab-ci.yml

parent 2177bf55
No related branches found
No related tags found
No related merge requests found
Pipeline #76566 failed
run_tests: image: "python:3.7"
stage: test
image: python:3.9 before_script:
before_script: - python --version
- pip install -r requirements.txt - pip install -r requirements.txt
script:
- python -m unittest discover tests stages:
- Static Analysis
- Test
...
pytest:
stage: Test
script:
- pytest
import unittest
def test_uppercase():
assert "loud noises".upper() == "LOUD NOISES"
class TestSum(unittest.TestCase): def test_reversed():
def test_list_int(self): assert list(reversed([1, 2, 3, 4])) == [4, 3, 2, 1]
"""
Test that it can sum a list of integers
"""
data = [1, 2, 3]
result = sum(data)
self.assertEqual(result, 6)
if __name__ == '__main__': def test_some_primes():
unittest.main() assert 37 in {
num
for num in range(2, 50)
if not any(num % div == 0 for div in range(2, num))
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment