#!/usr/bin/env python3 | |
# Copyright 2022 The Chromium Authors | |
# Use of this source code is governed by a BSD-style license that can be | |
# found in the LICENSE file. | |
import tempfile | |
import unittest | |
import os | |
import compare_build_artifacts | |
class Test(unittest.TestCase): | |
def test_diff_binary(self): | |
with tempfile.TemporaryDirectory() as dir: | |
filea = os.path.join(dir, 'a') | |
fileb = os.path.join(dir, 'b') | |
with open(filea, 'wb') as f: | |
f.write(b'a') | |
with open(fileb, 'wb') as f: | |
f.write(b'b') | |
self.assertEqual( | |
compare_build_artifacts.diff_binary(filea, fileb, 1), | |
"""1 out of 1 bytes are different (100.00%) | |
0x0 : 61 'a' | |
62 'b' | |
62 'b""") | |
if __name__ == '__main__': | |
unittest.main() |
b超是什么 | 昆明有什么特产 | 甲状腺结节忌口什么 | 今日立冬吃什么 | 奶奶的哥哥叫什么 |
再生纤维是什么面料 | 勒索是什么意思 | 什么矿泉水最贵 | 牛仔裤配什么鞋好看 | 中国为什么叫中国 |
zgo手表是什么牌子 | 苹果醋有什么功效 | 脑动脉硬化是什么意思 | 急性肠胃炎吃什么 | 宫内膜回声不均匀是什么意思 |
番外是什么意思 | 尿道口发痒是什么原因 | 补肾益精是什么意思 | 什么时候闰十月 | 吃什么药去体内湿气 |
摩羯座后面是什么星座hcv8jop2ns7r.cn | 心跳慢是什么原因hcv8jop6ns1r.cn | 中气不足是什么意思hcv8jop7ns4r.cn | 种田文什么意思hlguo.com | 广州和广东有什么区别hcv7jop6ns0r.cn |
观音菩萨的坐骑是什么naasee.com | mice是什么意思helloaicloud.com | 骨质增生吃什么药最好wmyky.com | o型血的孩子父母是什么血型hcv9jop3ns9r.cn | 2020年什么年hanqikai.com |
沙肝是什么hcv8jop5ns1r.cn | 萝卜不能和什么一起吃hcv9jop1ns9r.cn | 排骨蒸什么好吃hcv8jop5ns0r.cn | p2是什么意思0735v.com | 小排畸主要查什么hcv8jop8ns8r.cn |
导管是什么hcv8jop8ns4r.cn | 四月十七是什么星座hcv9jop6ns3r.cn | 差强人意什么意思sanhestory.com | 凤冈锌硒茶属于什么茶hcv8jop3ns4r.cn | 冰妹是什么hcv9jop2ns6r.cn |