PureMVC Architects Lounge

PureMVC Manifold => Standard Version => Topic started by: tobydeh on March 12, 2008, 03:17:50



Title: Python Port 0.0.1 All Tests Passed :)
Post by: tobydeh 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.


Title: Re: Python Port 0.0.1 All Tests Passed :)
Post by: Rhysyngsun 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!


Title: Re: Python Port 0.0.1 All Tests Passed :)
Post by: puremvc 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>



Title: Re: Python Port 0.0.1 All Tests Passed :)
Post by: tobydeh 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.


Title: Re: Python Port 0.0.1 All Tests Passed :)
Post by: tobydeh 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

:)