Skip to content

Commit

Permalink
test added
Browse files Browse the repository at this point in the history
  • Loading branch information
soeren-kirchner committed Oct 16, 2020
1 parent 98611ac commit e14ac26
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions pyimgbatch/test_pyimgbatch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import unittest
from pyimgbatch import to_int_or_none


class TestToIntOrNone(unittest.TestCase):

def test_to_int_or_none(self):
result = to_int_or_none(5)
self.assertIsNotNone(result)
self.assertEqual(result, 5)
result = to_int_or_none("5")
self.assertIsNotNone(result)
self.assertEqual(result, 6)


if __name__ == "__main__":
unittest.main()

0 comments on commit e14ac26

Please sign in to comment.