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

test du test final

parent dc1fdcbb
......@@ -25,7 +25,15 @@ class Test(unittest.TestCase):
assert int(hexa)==5
def test_binary_init_hex(self):
hex='0x5'
assert int(hex)==5
deftest_binary_init_intseq(self):
def test_binary_init_intseq(self):
int_list=[1,2,3,4]
for elt in int_list
assert type(elt)==int
def test_binary_init_strseq(self):
int_list_str=['1','2','3','4']
for elt in int_list
assert type(elt)==str
......@@ -11,9 +11,22 @@ 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):
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