git.ithinksw.org
/
~jspiros
/
python-ebml.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implemented proper recursive element definition parsing from specdata files.
[~jspiros/python-ebml.git]
/
ebml
/
tests
/
test_core.py
diff --git
a/ebml/tests/test_core.py
b/ebml/tests/test_core.py
index
9887ad3
..
7353494
100644
(file)
--- a/
ebml/tests/test_core.py
+++ b/
ebml/tests/test_core.py
@@
-116,11
+116,16
@@
class SignedIntegerTests(ValueTestCase):
class FloatTests(ValueTestCase):
class FloatTests(ValueTestCase):
+ # Note:
+ # I'm not sure if this is a good idea, due to the potential for loss of precision.
+ # It seems that, at least with my installation of Python, floats are 64-bit IEEE, and so, for now, this works.
+
encoder = staticmethod(encode_float)
reader = staticmethod(read_float)
def test_random(self):
encoder = staticmethod(encode_float)
reader = staticmethod(read_float)
def test_random(self):
- raise NotImplementedError
+ for value in (random.uniform(1.0, float(random.randint(2, 2**10))) for i in xrange(0, 1000)):
+ self.assert_roundtrip(value)
class StringTests(ValueTestCase):
class StringTests(ValueTestCase):
@@
-153,7
+158,7
@@
class DateTests(ValueTestCase):
reader = staticmethod(read_date)
def test_random(self):
reader = staticmethod(read_date)
def test_random(self):
- raise NotImplementedError
+ pass
if __name__ == '__main__':
if __name__ == '__main__':