From 9e45956113a3b878527bb7e093f99b2176642bab Mon Sep 17 00:00:00 2001 From: ryansurf Date: Fri, 24 May 2024 01:45:38 -0700 Subject: [PATCH] black formatting --- src/send_email.py | 1 + src/tests/tests.py | 19 +++++++++---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/send_email.py b/src/send_email.py index 4424d17..b32f780 100644 --- a/src/send_email.py +++ b/src/send_email.py @@ -29,6 +29,7 @@ message["To"] = RECEIVER_EMAIL message["Subject"] = os.getenv("SUBJECT") + def send_user_email(): """ Sends user an email diff --git a/src/tests/tests.py b/src/tests/tests.py index ada3382..9190822 100644 --- a/src/tests/tests.py +++ b/src/tests/tests.py @@ -3,6 +3,7 @@ """ import sys + sys.path.append("..") import unittest @@ -15,15 +16,18 @@ class TestDecimal(unittest.TestCase): def test_invalid_input(self): - with patch('sys.stdout', new=io.StringIO()) as fake_stdout: - extract_decimal(['decimal=NotADecimal']) + with patch("sys.stdout", new=io.StringIO()) as fake_stdout: + extract_decimal(["decimal=NotADecimal"]) printed_output = fake_stdout.getvalue().strip() - self.assertEqual(printed_output, "Invalid value for decimal. Please provide an integer.") + self.assertEqual( + printed_output, "Invalid value for decimal. Please provide an integer." + ) def test_default_input(self): decimal = extract_decimal([]) self.assertEqual(1, decimal) + class TestApis(unittest.TestCase): def test_get_coordinates(self): @@ -36,7 +40,7 @@ def test_get_coordinates(self): def test_get_uv(self): uv = get_uv(37, 122, 2) self.assertIsInstance(uv, (int, float)) - + def test_ocean_information(self): ocean = ocean_information(37, 122, 2) self.assertIsInstance(ocean[0], (int, float)) @@ -44,11 +48,6 @@ def test_ocean_information(self): self.assertIsInstance(ocean[2], (int, float)) - - - - - -if __name__ == '__main__': +if __name__ == "__main__": unittest.main()