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

test des 2 fonctions

parent 6ff7a925
import unittest
from binary import Binary
#define Test class as a derived class of the unittest.TestCase base class
class Test(unittest.TestCase):
def setUp(self):
self.binary = Binary(6)
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
import unittest
from binary import Binary
#define Test class as a derived class of the unittest.TestCase base class
class Test(unittest.TestCase):
def setUp(self):
self.binary = Binary(6)
def test_binary_init_int(self):
binary = Binary(6)
assert int(binary) == 6
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