test: AASXWriterTest fails sometimes
It's rare, but the AASXWriterTest can fail:
FAIL [0.038s]: test_writing_reading_example_aas (test.adapter.aasx.test_aasx.AASXWriterTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/jkhsjdhjs/git/pyAAS/test/adapter/aasx/test_aasx.py", line 96, in test_writing_reading_example_aas
self.assertEqual(new_cp.created, cp.created)
AssertionError: datetime.datetime(2020, 4, 3, 0, 59, 3, 500681) != datetime.datetime(2020, 4, 3, 0, 59, 3, 500682)
----------------------------------------------------------------------
bash script to reproduce it via brute force (execute in project root):
#!/usr/bin/env bash
i=1
while PYTHONPATH=".:$PYTHONPATH" python -m unittest test.adapter.aasx.test_aasx.AASXWriterTest; do
(( i++ ))
done
echo "test attempt $i failed"
Using this script you should be able to reproduce the issue in usually less than 200 attempts.
Issue first occured on Arch Linux with linux 5.5.13-arch2-1 and Python 3.8.2.
Reproduced on a Raspberry Pi 1 B running Raspbian buster with linux 4.19.66+ and Python 3.7.3.