Skip to content

Update tests.py #17

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
12 changes: 6 additions & 6 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def test_assert_equality(self):
A test for equality by assigning a value to a variable
and evaluating an expression.
"""
expected_value = _
expected_value = 2
truth_value = 1 + 1
self.assertEqual(expected_value, truth_value)

Expand All @@ -66,25 +66,25 @@ def test_assert_string(self):
"""
my_string = 'Hello World'
my_string_length = len(my_string) # The expression
self.assertEqual(10, my_string_length)
self.assertEqual(11, my_string_length)

def test_big_integers(self):
"""
A test to explore notation of big integers.
"""
x = 42,000
x = 42000
self.assertTrue(isinstance(x, int))

def test_bigger_integers(self):
"""
A test for bigger, or smaller integers
"""
big = 1e6
self.assertEqual(big, 100)
self.assertEqual(big, 100000)
self.assertTrue(type(big), int)

small = 1e-5
self.assertEqual(small, 0.0001)
self.assertEqual(small, 0.00001)
self.assertTrue(type(small), int)

def test_type_conversion(self):
Expand Down Expand Up @@ -114,7 +114,7 @@ def test_type_conversion_gotcha(self):
"""
j = 3.9999
self.assertTrue(int(j), float)
self.assertEqual(int(j), 4)
self.assertEqual(int(j), 3)

def tearDown(self):
"""
Expand Down