Skip to content

Commit

Permalink
Faster test suite execution for python3.
Browse files Browse the repository at this point in the history
  • Loading branch information
eerimoq committed Aug 28, 2016
1 parent f2b1719 commit 600d8e8
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions tests/test_bincopy.py
Expand Up @@ -3,7 +3,6 @@
import unittest
import bincopy


class BinCopyTest(unittest.TestCase):

def test_srec(self):
Expand All @@ -16,15 +15,13 @@ def test_srec(self):
binfile = bincopy.BinFile()
with open('tests/files/empty_main.s19', 'r') as fin:
binfile.add_srec(fin.read())
binfile.fill(b'\x00')
with open('tests/files/empty_main.bin', 'rb') as fin:
self.assertEqual(binfile.as_binary(), fin.read())
self.assertEqual(binfile.as_binary(padding=b'\x00'), fin.read())

binfile = bincopy.BinFile()
binfile.add_srec_file('tests/files/empty_main_rearranged.s19')
binfile.fill(b'\x00')
with open('tests/files/empty_main.bin', 'rb') as fin:
self.assertEqual(binfile.as_binary(), fin.read())
self.assertEqual(binfile.as_binary(padding=b'\x00'), fin.read())

try:
binfile.add_srec_file('tests/files/bad_crc.s19')
Expand Down Expand Up @@ -112,9 +109,8 @@ def test_exclude_crop(self):
with open('tests/files/empty_main.s19', 'r') as fin:
binfile.add_srec(fin.read())
binfile.exclude(0x400240, 0x400600)
binfile.fill(b'\x00')
with open('tests/files/empty_main_mod.bin', 'rb') as fin:
self.assertEqual(binfile.as_binary(), fin.read())
self.assertEqual(binfile.as_binary(padding=b'\x00'), fin.read())

binfile = bincopy.BinFile()
binfile.add_srec_file('tests/files/in.s19')
Expand Down

0 comments on commit 600d8e8

Please sign in to comment.