# Path: vii/Command.py
# class Part:
# 
#     def __init__(self):
#         self.numeral = ""
#         self.operator = ""
#         self.inserts = []
#         self.register = None
#         self.count = None
#         self.ready = False
# 
#     def appendToNumeral(self,  tokoen):
#         self.numeral += tokoen
# 
#     def appendToInserts(self, token):
#         self.inserts.append(token)
# 
#     def numeralToCount(self):
#         if len(self.numeral) > 0:
#             self.count = int(self.numeral)
# 
#     def insert(self):
#         return self.inserts[-1]
# 
# class Command:
# 
#     def __init__(self):
#         self.parts = []
# 
#     def extend(self):
#         self.parts.append(Part())
# 
#     def part(self, nr):
#         return self.parts[nr]
# 
#     def previous(self):
#         return self.parts[-2]
# 
#     def last(self):
#         return self.parts[-1]
# 
#     def multiplyAll(self):
#         result = 1
#         for i in range(len(self.parts)):
#             count = self.parts[i].count
#             count = count if count else 1
#             result *= count
#         return result
# 
#     def hasNoCounts(self):
#         result = True
#         for i in range(len(self.parts)):
#             count = self.parts[i].count
#             if count: result = False
#         return result
# 
#     """ Shortcuts to the last part """
# 
#     def lpReady(self):
#         return self.last().ready
# 
#     def lpRegister(self):
#         return self.last().register
# 
#     def lpOperator(self):
#         return self.last().operator
# 
#     def lpCount(self):
#         return self.last().count
# 
#     def lpInserts(self):
#         return self.last().inserts
# 
#     def lpInsert(self):
#         return self.last().insert()


from vii.Command import Part, Command
        assert self.fixture.numeral == ""
        assert self.fixture.operator == ""
        assert self.fixture.inserts == []
        assert self.fixture.register == None
        assert self.fixture.count == None
        assert self.fixture.ready == False

    def test_appendToNumeral_and_count(self):
        self.fixture.appendToNumeral("2")
        self.fixture.appendToNumeral("3")
        assert self.fixture.numeral == "23"
        self.fixture.numeralToCount()
        assert self.fixture.count == 23

    def test_appendToInserts(self):
        self.fixture.appendToInserts("a")
        self.fixture.appendToInserts("b")
        assert self.fixture.inserts == ["a", "b"]

    def test_insert(self):
        self.fixture.appendToInserts("a")
        self.fixture.appendToInserts("b")
        assert self.fixture.insert() == "b"

class TestCommand:

    def setup(self):
        self.fixture = Command()
        self.fixture.extend()


# Path: vii/Command.py
# class Part:
# 
#     def __init__(self):
#         self.numeral = ""
#         self.operator = ""
#         self.inserts = []
#         self.register = None
#         self.count = None
#         self.ready = False
# 
#     def appendToNumeral(self,  tokoen):
#         self.numeral += tokoen
# 
#     def appendToInserts(self, token):
#         self.inserts.append(token)
# 
#     def numeralToCount(self):
#         if len(self.numeral) > 0:
#             self.count = int(self.numeral)
# 
#     def insert(self):
#         return self.inserts[-1]
# 
# class Command:
# 
#     def __init__(self):
#         self.parts = []
# 
#     def extend(self):
#         self.parts.append(Part())
# 
#     def part(self, nr):
#         return self.parts[nr]
# 
#     def previous(self):
#         return self.parts[-2]
# 
#     def last(self):
#         return self.parts[-1]
# 
#     def multiplyAll(self):
#         result = 1
#         for i in range(len(self.parts)):
#             count = self.parts[i].count
#             count = count if count else 1
#             result *= count
#         return result
# 
#     def hasNoCounts(self):
#         result = True
#         for i in range(len(self.parts)):
#             count = self.parts[i].count
#             if count: result = False
#         return result
# 
#     """ Shortcuts to the last part """
# 
#     def lpReady(self):
#         return self.last().ready
# 
#     def lpRegister(self):
#         return self.last().register
# 
#     def lpOperator(self):
#         return self.last().operator
# 
#     def lpCount(self):
#         return self.last().count
# 
#     def lpInserts(self):
#         return self.last().inserts
# 
#     def lpInsert(self):
#         return self.last().insert()


# Path: tests/Command_Test.py
from vii.Command import Part, Command

        assert self.fixture.numeral == ""
        assert self.fixture.operator == ""
        assert self.fixture.inserts == []
        assert self.fixture.register == None
        assert self.fixture.count == None
        assert self.fixture.ready == False

    def test_appendToNumeral_and_count(self):
        self.fixture.appendToNumeral("2")
        self.fixture.appendToNumeral("3")
        assert self.fixture.numeral == "23"
        self.fixture.numeralToCount()
        assert self.fixture.count == 23

    def test_appendToInserts(self):
        self.fixture.appendToInserts("a")
        self.fixture.appendToInserts("b")
        assert self.fixture.inserts == ["a", "b"]

    def test_insert(self):
        self.fixture.appendToInserts("a")
        self.fixture.appendToInserts("b")
        assert self.fixture.insert() == "b"

class TestCommand:

    def setup(self):
        self.fixture = Command()
        self.fixture.extend()


    def test_setup(self):