From 1169805e54fe4f952f6fa1d904885dcba9dda5d6 Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Sun, 4 Aug 2013 15:35:51 -0500 Subject: improve the test for incbin splitting --- tests/tests.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tests/tests.py') 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'] -- cgit v1.2.3