summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2013-08-04 15:35:51 -0500
committerBryan Bishop <kanzure@gmail.com>2013-08-04 15:35:51 -0500
commit1169805e54fe4f952f6fa1d904885dcba9dda5d6 (patch)
tree8360462e77fb04c0dc28e3299284aa6aa4020c2e
parent5c32531c48ed0bb1cf2f191a78045cb4e0441fba (diff)
improve the test for incbin splitting
-rw-r--r--tests/tests.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/tests.py b/tests/tests.py
index bed8213..90f40f4 100644
--- a/tests/tests.py
+++ b/tests/tests.py
@@ -89,6 +89,7 @@ from pokemontools.crystal import (
)
import unittest
+import mock
class TestCram(unittest.TestCase):
"this is where i cram all of my unit tests together"
@@ -504,8 +505,12 @@ class TestAsmList(unittest.TestCase):
# must be the 4th line (the INBIN line)
self.assertEqual(line_num, 3)
- def test_split_incbin_line_into_three(self):
+ @mock.patch("os.lstat")
+ def test_split_incbin_line_into_three(self, mock_os_lstat):
global asm, incbin_lines, processed_incbins
+
+ mock_os_lstat.return_value.st_size = 0x10000
+
asm = ['first line', 'second line', 'third line',
'INCBIN "baserom.gbc",$90,$200 - $90',
'fifth line', 'last line']