def test_more_annotations():
    a = dict(foo=1234,
             zoo=[123.1, 456.2, 789.3],
             species='Platypus',
             birthdays=[Datetime(1969,4,28), Datetime(1973,12,8), Datetime(2008,1,3)],
             test_boolean=True,
             test_mo_booleans=[False, True, True, False])
    sa = to_synapse_annotations(a)
    print(sa)
    assert sa['longAnnotations']['foo'] == [1234]
    assert sa['doubleAnnotations']['zoo'] == [123.1, 456.2, 789.3]
    assert sa['stringAnnotations']['species'] == ['Platypus']
    assert sa['stringAnnotations']['test_boolean'] == ['true']
    assert sa['stringAnnotations']['test_mo_booleans'] == ['false', 'true', 'true', 'false']

    ## this part of the test is kinda fragile. It it breaks again, it should be removed
    bdays = [utils.from_unix_epoch_time(t) for t in sa['dateAnnotations']['birthdays']]
    assert all([t in bdays for t in [Datetime(1969,4,28), Datetime(1973,12,8), Datetime(2008,1,3)]])
Test long, float and data annotations
dataset/ETHPy150Open Sage-Bionetworks/synapsePythonClient/tests/unit/unit_test_annotations.py/test_more_annotations