()
| 15 | import ccxt.async_support as ccxt # noqa: F402 |
| 16 | |
| 17 | def test_binary_concat(): |
| 18 | exchange = ccxt.Exchange({ |
| 19 | 'id': 'sampleexchange', |
| 20 | }) |
| 21 | # Test 1: Concat two binaries |
| 22 | binary1 = exchange.string_to_binary('hello') |
| 23 | binary2 = exchange.string_to_binary(' world') |
| 24 | result1 = exchange.binary_concat(binary1, binary2) |
| 25 | assert exchange.binary_to_string(result1) == 'hello world' |
| 26 | # Test 2: Concat three binaries |
| 27 | binary3 = exchange.string_to_binary('foo') |
| 28 | binary4 = exchange.string_to_binary('bar') |
| 29 | binary5 = exchange.string_to_binary('baz') |
| 30 | result2 = exchange.binary_concat(binary3, binary4, binary5) |
| 31 | assert exchange.binary_to_string(result2) == 'foobarbaz' |
| 32 | # Test 3: Concat with hex bytes |
| 33 | result3 = exchange.binary_concat(exchange.base16_to_binary('68656c6c6f'), exchange.string_to_binary(' world')) |
| 34 | assert exchange.binary_to_string(result3) == 'hello world' |
no test coverage detected
searching dependent graphs…