Skip to content

Chore/format unit test output #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Scientific Computing with Python - freeCodeCamp
# Scientific Computing with Python

## About the Projects
This repository contains my solutions to the projects in "Scientific Computing with Python" course from freeCodeCamp.
Expand Down
6 changes: 5 additions & 1 deletion arithmetic_formatter/test_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@


class UnitTests(unittest.TestCase):
@classmethod
def setUpClass(cls) -> None:
test_name = "Arithmetic Formatter Tests"
print(f"\n{test_name}\n{'=' * len(test_name)}")

@parameterized.expand([
param(name="test_two_problems_arrangement1",
Expand Down Expand Up @@ -60,7 +64,7 @@ class UnitTests(unittest.TestCase):
msg='Expected solutions to be correctly displayed in output when calling "arithmetic_arranger()" with '
'five arithmetic problems and a second argument of `True`.')
])
def test_arithmetic_formatter(self, name: str, args: List[Union[List[str], Optional[bool]]], expected: str,
def test_arithmetic_formatter(self, name, args: List[Union[List[str], Optional[bool]]], expected: str,
msg: str):
actual: str = formatter(*args)
self.assertEqual(actual, expected, msg)
Expand Down
5 changes: 5 additions & 0 deletions budget_app/test_budget.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
class UnitTests(unittest.TestCase):
maxDiff = None

@classmethod
def setUpClass(cls) -> None:
test_name = "Budget App Tests"
print(f"\n{test_name}\n{'=' * len(test_name)}")

def setUp(self):
self.food = Category("Food")
self.entertainment = Category("Entertainment")
Expand Down
5 changes: 5 additions & 0 deletions polygon_area_calculator/test_polygon_area_calc.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
class UnitTests(unittest.TestCase):
maxDiff = None

@classmethod
def setUpClass(cls) -> None:
test_name = "Polygon Area Tests"
print(f"\n{test_name}\n{'=' * len(test_name)}")

def setUp(self):
self.rect = Rectangle(3, 6)
self.sq = Square(5)
Expand Down
5 changes: 5 additions & 0 deletions probability_calculator/test_prob_calc.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
class UnitTests(unittest.TestCase):
maxDiff = None

@classmethod
def setUpClass(cls) -> None:
test_name = "Probability Calculator Tests"
print(f"\n{test_name}\n{'=' * len(test_name)}")

def test_hat_class_contents(self):
hat = Hat(red=3, blue=2)
actual = hat.contents
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "python-projects"
version = "1.0.0"
description = ""
description = "Python projects made for the freeCodeCamp Scientific Computing with Python Certification."
authors = ["mrarvind90 <arvindrankalidas@gmail.com>"]
readme = "README.md"

Expand Down
5 changes: 5 additions & 0 deletions time_calculator/test_time_calc.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
class UnitTests(unittest.TestCase):
maxDiff = None

@classmethod
def setUpClass(cls) -> None:
test_name = "Time Calculator Tests"
print(f"\n{test_name}\n{'=' * len(test_name)}")

def test_same_period(self):
actual = add_time("3:30 PM", "2:12")
expected = "5:42 PM"
Expand Down