Commit dc1fdcbb authored by Cadiot Matthieu's avatar Cadiot Matthieu
Browse files

test des 4 fonctions

parent a75014ed
......@@ -11,9 +11,21 @@ class Test(unittest.TestCase):
binary = Binary(6)
assert int(binary) == 6
def test_binary_init_bitstr():
def test_binary_init_bitstr(self):
binary = Binary('101')
assert int(binary)==5
def test_binary_init_binstr(self):
binary=bin(5)
assert int(binary)==5
def test_binary_init_hexstr(self):
hexa=hex(5)
assert int(hexa)==5
def test_binary_init_hex(self):
deftest_binary_init_intseq(self):
def test_binary_init_strseq(self):
......@@ -10,5 +10,10 @@ class Test(unittest.TestCase):
def test_binary_init_int(self):
binary = Binary(6)
assert int(binary) == 6
def test_binary_init_bitstr():
binary = Binary('101')
assert int(binary)==5
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment