Skip to content
Snippets Groups Projects
Select Git revision
  • c4e0704107805f9c39259a3ea0607cf97fc49d2a
  • master default protected
  • backslash
  • nickname-match-configs
  • genofire/leds_rgb_get_state
  • genofire/rockets-state
  • genofire/ble-follow-py
  • plaetzchen/ios-workaround
  • blinkisync-as-preload
  • genofire/haule-ble-fs-deactive
  • schneider/max30001-pycardium
  • schneider/max30001-epicaridum
  • schneider/max30001
  • schneider/stream-locks
  • ios-workarounds
  • schneider/fundamental-test
  • schneider/ble-buffers
  • schneider/maxim-sdk-update
  • ch3/splashscreen
  • koalo/bhi160-works-but-dirty
  • koalo/wip/i2c-for-python
  • v1.9
  • v1.8
  • v1.7
  • v1.6
  • v1.5
  • v1.4
  • v1.3
  • v1.2
  • v1.1
  • v1.0
  • release-1
  • bootloader-v1
  • v0.0
34 results

ble_stack_fit.c

Blame
  • Forked from card10 / firmware
    Source project has a limited visibility.
    non_compliant.py 1.38 KiB
    # tests for things that are not implemented, or have non-compliant behaviour
    
    import array
    
    # array deletion not implemented
    try:
        a = array.array('b', (1, 2, 3))
        del a[1]
    except TypeError:
        print('TypeError')
    
    # slice with step!=1 not implemented
    try:
        a = array.array('b', (1, 2, 3))
        print(a[3:2:2])
    except NotImplementedError:
        print('NotImplementedError')
    
    # should raise type error
    try:
        print(set('12') >= '1')
    except TypeError:
        print('TypeError')
    
    # should raise type error
    try:
        print(set('12') <= '123')
    except TypeError:
        print('TypeError')
    
    # uPy raises TypeError, shold be ValueError
    try:
        '%c' % b'\x01\x02'
    except (TypeError, ValueError):
        print('TypeError, ValueError')
    
    # attributes/subscr not implemented
    try:
        print('{a[0]}'.format(a=[1, 2]))
    except NotImplementedError:
        print('NotImplementedError')
    
    # str(...) with keywords not implemented
    try:
        str(b'abc', encoding='utf8')
    except NotImplementedError:
        print('NotImplementedError')
    
    # str.rsplit(None, n) not implemented
    try:
        'a a a'.rsplit(None, 1)
    except NotImplementedError:
        print('NotImplementedError')
    
    # bytes(...) with keywords not implemented
    try:
        bytes('abc', encoding='utf8')
    except NotImplementedError:
        print('NotImplementedError')
    
    # bytes subscr with step!=1 not implemented
    try:
        b'123'[0:3:2]
    except NotImplementedError:
        print('NotImplementedError')