Skip to content

Commit

Permalink
pre-commit works, nevermind
Browse files Browse the repository at this point in the history
  • Loading branch information
ryansurf committed May 30, 2024
1 parent 2f6b3ac commit e5d4bf7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,22 @@

from src.api import get_coordinates, get_uv, ocean_information


def test_get_coordinates():
coordinates = get_coordinates(["loc=santa_cruz"])
lat = coordinates[0]
long = coordinates[1]
assert isinstance(lat, (int, float))
assert isinstance(long, (int, float))


def test_get_uv():
uv = get_uv(37, 122, 2)
assert isinstance(uv, (int, float))


def test_ocean_information():
ocean = ocean_information(37, 122, 2)
assert isinstance(ocean[0], (int, float))
assert isinstance(ocean[1], (int, float))
assert isinstance(ocean[2], (int, float))

4 changes: 3 additions & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
Make sure pytest is installed: pip install pytest
Run pytest: pytest
"""
from src import cli

import time

from src import cli


def test_cli_output():
"""
Expand Down
4 changes: 3 additions & 1 deletion tests/test_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

from src.helper import extract_decimal


def test_invalid_input():
"""
Test if decimal input prints proper invalid input message
Expand All @@ -19,9 +20,10 @@ def test_invalid_input():
expected = "Invalid value for decimal. Please provide an integer."
assert printed_output == expected


def test_default_input():
"""
Test that when no decimal= in args, 1 is the default
"""
decimal = extract_decimal([])
assert 1 == decimal
assert 1 == decimal

1 comment on commit e5d4bf7

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCoverMissing
src
   __init__.py00100% 
   api.py85693%30, 48, 69–70, 101–102
   art.py9367%24–25, 37
   cli.py23483%29, 47–48, 52
   gpt.py5340%14–19
   helper.py1364666%47, 58–62, 95–103, 115, 128–129, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 178–180, 190, 192–193, 211–212, 249–257, 264–266
   send_email.py24240%5–48
   server.py41410%5–82
   settings.py190100% 
TOTAL34212763% 

Tests Skipped Failures Errors Time
6 0 💤 0 ❌ 0 🔥 11.298s ⏱️

Please sign in to comment.