omf-python
omf-python copied to clipboard
Tests failed with errors
This is my first time trying this project. The setup and dependencies installation seem OK but the test run failed with errors.
Test result attached.
OS: Window 7 Professional x64 Python 3.7.0 (tried x64 version, same errors) The latest omf revision test_result.txt
Found the cause of the failures, but do not have the permissions to push the fixes.
For test_base.py:
- put a tenth of second sleep before change the model to get the modified datetime that fixed the
assert model.date_modified > date_modifiedin test_modify and test_validate_updates
model = MyModelWithInt()
date_created = model.date_created
date_modified = model.date_modified
time.sleep(.1)
model.my_int = 0
assert model.date_created == date_created
assert model.date_modified > date_modified
For test_serializer:
- randint() creates type 'int32' by default while omf'd default is 'int64', so this did the trick:
np.random.randint(100, size=[4, 5, 6], dtype='int64'),
np.random.randint(100, size=[3], dtype='int64'),