Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: Python Port 0.0.1 All Tests Passed :)  (Read 14294 times)
tobydeh
Moderator
Sr. Member
*****
Posts: 52


View Profile Email
« on: March 12, 2008, 03:17:50 »

Hi,

I have ported and passed all of the unit tests. See below:

PyMate r8111 running Python 2.5.1 (python)
>>> unit.py

ControllerTest: Test instance not null ... ok
ControllerTest: Test instance implements IController ... ok
ControllerTest: Test registerCommand() and executeCommand(0) ... ok
ControllerTest: Test registerCommand() and removeCommand() ... ok
ControllerTest: Test hasCommand() ... ok
ModelTest: Test instance not null ... ok
ModelTest: Test instance implements IModel ... ok
ModelTest: Test registerProxy() and retrieveProxy() ... ok
ModelTest: Test registerProxy() and removeProxy() ... ok
ModelTest: Test hasProxy() ... ok
ModelTest: Test onRegister() and onRemove() ... ok
ViewTest: Test instance not null ... ok
ViewTest: Test instance implements IView ... ok
ViewTest: Test registerObserver() and notifyObservers() ... ok
ViewTest: Test registerMediator() and retrieveMediator() ... ok
ViewTest: Test hasMediator() ... ok
ViewTest: Test registerMediator() and removeMediator() ... ok
ViewTest: Test onRegsiter() and onRemove() ... ok
ViewTest: Test Successive registerMediator() and removeMediator() ... ok
ViewTest: Test removeMediator() and subsequent nofity() ... ok
ViewTest: Test removing one of two Mediators and subsequent notify() ... ok
CommandTest: Test MacroCommand execute() ... ok
CommandTest: Test SimpleCommand execute() ... ok
FacadeTest: Test instance not null ... ok
FacadeTest: Test instance implements IFacade ... ok
FacadeTest: Test registerCommand() and sendNotification() ... ok
FacadeTest: Test removeCommand() and subsequent sendNotification() ... ok
FacadeTest: Test registerProxy() and retrieveProxy() ... ok
FacadeTest: Test registerProxy() and removeProxy() ... ok
FacadeTest: Test registerMediator() retrieveMediator() and removeMediator() ... ok
FacadeTest: Test hasProxy() ... ok
FacadeTest: Test hasMediator() ... ok
FacadeTest: Test hasCommand() ... ok
MediatorTest: Test getMediatorName() ... ok
MediatorTest: Test getViewComponent() ... ok
ObserverTest: Test Observer Accessors ... ok
ObserverTest: Test Observer Constructor ... ok
ObserverTest: Test compareNotifyContext() ... ok
NotificationTest: Test Name Accessors ... ok
NotificationTest: Test Body Accessors ... ok
NotificationTest: Test Constructor ... ok
ProxyTest: Test Name Accessor ... ok
ProxyTest: Test Data Accessors ... ok
ProxyTest: Test Constructor ... ok

----------------------------------------------------------------------
Ran 44 tests in 0.009s

OK



The framework still needs a lot of improvement. I used the import "as" functionality as we discussed in the previous post... it is slightly better but still not perfect.

I had lots of other issues and things to mention but i have completely forgotten them... probably because i have been typing unit tests for the past 5 hours!!

When they come back to be i will discuss them.

I would also like to take over as project lead, if that is ok with everyone?

Toby.
« Last Edit: March 12, 2008, 03:25:16 by tobydeh » Logged
Rhysyngsun
Courseware Beta
Sr. Member
***
Posts: 51

Nathan Levesque

 - rhysyngsun@gmail.com  - rhysyngsun
View Profile WWW Email
« Reply #1 on: March 12, 2008, 06:49:19 »

Yes, I think it would be appropriate for you to take over as project lead since you've done most of the worst to getting the port running, it's more your baby than mine. I'll mention it to Cliff and he should be able to get you set up with the repository and other information.

Great job, btw!
Logged

puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #2 on: March 12, 2008, 07:16:55 »

Awesome!

Right now Python is as cryptic as Linear B to me, so if you can make it work, then I definitely agree you're the appropriate person to to lead if you're up to it.

And a great thanks to Nathan for his pioneering efforts on this, and I hope eventual proginator of demos and utilities :) We've got a whole sub-community to kickstart here, so there's lots to be done!

-=Cliff>

Logged
tobydeh
Moderator
Sr. Member
*****
Posts: 52


View Profile Email
« Reply #3 on: March 13, 2008, 05:25:08 »

I Have have a new version which is more stable:

Finalized the import statement.
I decided to go with "import x" and loose the "import x as y"
"import x as y" causes the same circular import problems, and seems slightly sloppy.
Typing the full package name is a bit annoying but its robust.

Improved all Singleton classes
AppFacade.getInstance() and Facade.getInstance() now refer to the same location in memory
Singletons are now generally more robust


I have started porting the documentation, I will upload when it is finished.
Logged
tobydeh
Moderator
Sr. Member
*****
Posts: 52


View Profile Email
« Reply #4 on: March 13, 2008, 09:16:44 »

I have ported all documentation (except for code examples) and made some more minor improvements.

http://www.tobydehavilland.com/puremvc/PureMVC_Python_0_2_1.zip

:)
« Last Edit: March 13, 2008, 10:27:55 by tobydeh » Logged
Pages: [1]
Print