# -*- coding: UTF-8 -*-
# 作者：huanhuilong
# 标题：Python 常用内置方法(1)
# 描述：内置函数基本用例，基本测试+执行,，每个 assert 结果都是 True

if __name__ == '__main__':
    assert abs(-1) == 1
    assert max(10, 100) == 100
    assert min(10, 100) == 10
    assert round(3.5) == 3
    assert pow(2, 4) == 16
    assert all([True, True]) == True
    assert any([True, False]) == True
    assert ascii('你') == "'\\u4f60'"
    assert bin(2) == '0b10'
    assert bool({}) == False
    assert bytes([0, 1]) == b'\x00\x01'
    assert str(1) == '1'
    assert callable(abs) == True
    assert chr(97) == 'a'
    assert 'count' in dir([])
    assert float(1) == 1.0
    assert '{}, {}, {}'.format('a', 'b', 'c') == 'a, b, c'
    assert hash("a") == hash(chr(97))
    assert hex(1) == '0x1'
    assert type({}) == type({'a': 1})
