-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move to v.0.2.0 and restyle code and usage
- Loading branch information
Showing
6 changed files
with
70 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
from .gematria import Gematria | ||
"""Convert numbers to Hebrew letters""" | ||
|
||
__version__ = "0.2.0" | ||
|
||
from .gematria import to_hebrew |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
import setuptools | ||
import gematriapy | ||
|
||
with open("README.md", "r", encoding="utf-8") as fh: | ||
long_description = fh.read() | ||
|
||
setuptools.setup( | ||
name="gematriapy", | ||
version="0.1.0", | ||
version=gematriapy.__version__, | ||
author="Noam Nol", | ||
author_email="[email protected]", | ||
description="Convert numbers to Hebrew letters", | ||
description=gematriapy.__doc__, | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
url="https://github.com/NoamNol/gematriapy", | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import unittest | ||
import gematriapy | ||
|
||
|
||
class TestGematriapy_ToHebrew(unittest.TestCase): | ||
def test_simple_num(self): | ||
self.assertEqual(gematriapy.to_hebrew(3), "ג") | ||
|
||
def test_15_num(self): | ||
self.assertEqual(gematriapy.to_hebrew(15), "טו") | ||
|
||
def test_16_num(self): | ||
self.assertEqual(gematriapy.to_hebrew(16), "טז") | ||
|
||
def test_random_tens_num_v1(self): | ||
self.assertEqual(gematriapy.to_hebrew(24), "כד") | ||
|
||
def test_random_tens_num_v2(self): | ||
self.assertEqual(gematriapy.to_hebrew(77), "עז") | ||
|
||
def test_random_hundreds_num_v1(self): | ||
self.assertEqual(gematriapy.to_hebrew(250), "רנ") | ||
|
||
def test_random_hundreds_num_v2(self): | ||
self.assertEqual(gematriapy.to_hebrew(499), "תצט") | ||
|
||
def test_bigger_than_800_num(self): | ||
self.assertEqual(gematriapy.to_hebrew(822), "תתכב") | ||
|
||
def test_hundreds_num_that_ends_with_15(self): | ||
self.assertEqual(gematriapy.to_hebrew(515), "תקטו") | ||
|
||
def test_hundreds_num_that_ends_with_16(self): | ||
self.assertEqual(gematriapy.to_hebrew(516), "תקטז") | ||
|
||
def test_zero(self): | ||
with self.assertRaises(Exception): | ||
gematriapy.to_hebrew(0) | ||
|
||
def test_negative(self): | ||
with self.assertRaises(Exception): | ||
gematriapy.to_hebrew(-1) | ||
|
||
def test_too_big(self): | ||
with self.assertRaises(Exception): | ||
gematriapy.to_hebrew(1000) |