From 10228a69b0e2add381b77d82b1323a12ad9a006b Mon Sep 17 00:00:00 2001 From: Mike Naberezny Date: Tue, 7 Apr 2009 17:48:57 -0700 Subject: [PATCH] Moved MPU models into py65.devices. --- src/py65/devices/__init__.py | 1 + src/py65/{ => devices}/mpu6502.py | 0 src/py65/{ => devices}/mpu65c02.py | 2 +- src/py65/monitor.py | 2 +- src/py65/tests/devices/__init__.py | 1 + src/py65/tests/{ => devices}/test_mpu6502.py | 6 +++--- src/py65/tests/{ => devices}/test_mpu65c02.py | 6 +++--- src/py65/tests/test_disassembler.py | 2 +- 8 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 src/py65/devices/__init__.py rename src/py65/{ => devices}/mpu6502.py (100%) rename src/py65/{ => devices}/mpu65c02.py (94%) create mode 100644 src/py65/tests/devices/__init__.py rename src/py65/tests/{ => devices}/test_mpu6502.py (99%) rename src/py65/tests/{ => devices}/test_mpu65c02.py (86%) diff --git a/src/py65/devices/__init__.py b/src/py65/devices/__init__.py new file mode 100644 index 0000000..a003759 --- /dev/null +++ b/src/py65/devices/__init__.py @@ -0,0 +1 @@ +# this is a package diff --git a/src/py65/mpu6502.py b/src/py65/devices/mpu6502.py similarity index 100% rename from src/py65/mpu6502.py rename to src/py65/devices/mpu6502.py diff --git a/src/py65/mpu65c02.py b/src/py65/devices/mpu65c02.py similarity index 94% rename from src/py65/mpu65c02.py rename to src/py65/devices/mpu65c02.py index b5f6954..b556d1e 100644 --- a/src/py65/mpu65c02.py +++ b/src/py65/devices/mpu65c02.py @@ -1,4 +1,4 @@ -from py65.mpu6502 import MPU as NMOS6502 +from py65.devices.mpu6502 import MPU as NMOS6502 from py65.utils.devices import make_instruction_decorator class MPU(NMOS6502): diff --git a/src/py65/monitor.py b/src/py65/monitor.py index 96b0cd7..23f0f77 100644 --- a/src/py65/monitor.py +++ b/src/py65/monitor.py @@ -6,7 +6,7 @@ import re import shlex import asyncore import sys -from py65.mpu6502 import MPU +from py65.devices.mpu6502 import MPU from py65.disassembler import Disassembler from py65.assembler import Assembler from py65.utils.addressing import AddressParser diff --git a/src/py65/tests/devices/__init__.py b/src/py65/tests/devices/__init__.py new file mode 100644 index 0000000..a003759 --- /dev/null +++ b/src/py65/tests/devices/__init__.py @@ -0,0 +1 @@ +# this is a package diff --git a/src/py65/tests/test_mpu6502.py b/src/py65/tests/devices/test_mpu6502.py similarity index 99% rename from src/py65/tests/test_mpu6502.py rename to src/py65/tests/devices/test_mpu6502.py index b87a966..b0fe794 100644 --- a/src/py65/tests/test_mpu6502.py +++ b/src/py65/tests/devices/test_mpu6502.py @@ -1,6 +1,6 @@ import unittest import sys -import py65.mpu6502 +import py65.devices.mpu6502 class Common6502Tests: """Tests common to 6502-based microprocessors""" @@ -4593,7 +4593,7 @@ class Common6502Tests: class MPUTests(unittest.TestCase, Common6502Tests): - """ NMOS 6502 (py65.mpu6502) tests """ + """ NMOS 6502 tests """ def test_repr(self): mpu = self._make_mpu() @@ -4606,7 +4606,7 @@ class MPUTests(unittest.TestCase, Common6502Tests): self.assertRaises(NotImplementedError, mpu.step) def _get_target_class(self): - return py65.mpu6502.MPU + return py65.devices.mpu6502.MPU def test_suite(): diff --git a/src/py65/tests/test_mpu65c02.py b/src/py65/tests/devices/test_mpu65c02.py similarity index 86% rename from src/py65/tests/test_mpu65c02.py rename to src/py65/tests/devices/test_mpu65c02.py index d9decc7..addd4f5 100644 --- a/src/py65/tests/test_mpu65c02.py +++ b/src/py65/tests/devices/test_mpu65c02.py @@ -1,7 +1,7 @@ import unittest import sys -import py65.mpu65c02 -from py65.tests.test_mpu6502 import Common6502Tests +import py65.devices.mpu65c02 +from py65.tests.devices.test_mpu6502 import Common6502Tests class MPUTests(unittest.TestCase, Common6502Tests): @@ -24,7 +24,7 @@ class MPUTests(unittest.TestCase, Common6502Tests): # Test Helpers def _get_target_class(self): - return py65.mpu65c02.MPU + return py65.devices.mpu65c02.MPU def test_suite(): diff --git a/src/py65/tests/test_disassembler.py b/src/py65/tests/test_disassembler.py index 93dd09b..73640a6 100644 --- a/src/py65/tests/test_disassembler.py +++ b/src/py65/tests/test_disassembler.py @@ -1,6 +1,6 @@ import unittest import sys -from py65.mpu6502 import MPU +from py65.devices.mpu6502 import MPU from py65.disassembler import Disassembler from py65.utils.addressing import AddressParser