Skip to content
Snippets Groups Projects
Commit 4454b709 authored by wep23441's avatar wep23441
Browse files

testing case 2.3

parent 6a1e7caa
No related branches found
No related tags found
No related merge requests found
......@@ -12,16 +12,16 @@ include:
# # Case 2 Test
# # stages: code_quality, test
# - local: ci-configs/case-2-test/lint.yml
- local: ci-configs/case-2-test/coverage.yml
- local: ci-configs/case-2-test/unit_test.yml
# - local: ci-configs/case-2-test/coverage.yml
# - local: ci-configs/case-2-test/unit_test.yml
# # Case 3 Build
# # stages: code_quality, test, build, build_image
# - local: ci-configs/case-3-build/lint.yml
# - local: ci-configs/case-3-build/coverage.yml
# - local: ci-configs/case-3-build/unit_test.yml
# - local: ci-configs/case-3-build/build.yml
# - local: ci-configs/case-3-build/build_image.yml
- local: ci-configs/case-3-build/build.yml
- local: ci-configs/case-3-build/build_image.yml
# Case 4 Security
# stages: code_quality, security_checks, build_image, test_image
......
pytest==8.3.5
pytest==999.999.999
pytest-cov==6.0.0
coverage==7.7.0
import pytest
import pytest, math, pytorch, numpy
from wizard_calculator import (
summon_dragons,
......@@ -21,21 +21,21 @@ def test_vanish_trolls():
assert vanish_trolls(10, 0) == 10
def test_brew_potions():
assert brew_potions(2, 3) == 6
assert brew_potions(-1, 3) == -3
assert brew_potions(0, 100) == 0
# def test_brew_potions():
# assert brew_potions(2, 3) == 6
# assert brew_potions(-1, 3) == -3
# assert brew_potions(0, 100) == 1
def test_cast_division_spell():
assert cast_division_spell(6, 3) == 2
assert cast_division_spell(10, 2) == 5
assert cast_division_spell(7, 7) == 1
with pytest.raises(ValueError):
cast_division_spell(1, 0)
# def test_cast_division_spell():
# assert cast_division_spell(6, 3) == 2
# assert cast_division_spell(10, 2) == 3
# assert cast_division_spell(7, 7) == 1
# with pytest.raises(ValueError):
# cast_division_spell(1, 0)
def test_conjure_magic_circle_area():
assert conjure_magic_circle_area(3) == pytest.approx(28.274, 0.001)
assert conjure_magic_circle_area(0) == 0
assert conjure_magic_circle_area(1) == pytest.approx(3.14159, 0.001)
# def test_conjure_magic_circle_area():
# assert conjure_magic_circle_area(3) == pytest.approx(28.274, 0.001)
# assert conjure_magic_circle_area(0) == 0
# assert conjure_magic_circle_area(1) == pytest.approx(3.14159, 0.001)
......@@ -3,5 +3,5 @@ unit_test:
image: python:3.11
script:
- pip install -r ./case-2-test/requirements.txt
- pytest ./case-2-test/test_wizard_calculator.py
- pytestt ./case-2-test/test_wizard_calculator.py
allow_failure: false
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment