Changed project description.

This commit is contained in:
Przemyslaw Gajda 2012-04-30 22:36:52 +02:00
parent e5bec16ee5
commit 1e965c9d02
2 changed files with 22 additions and 48 deletions

View File

@ -1,59 +1,33 @@
Mox is an open source mock object framework for Python, inspired by
the Java library EasyMock.
Mox3 - Mock object framework for Python 3.
Mox3 is an unofficial port of the Google mox framework
(http://code.google.com/p/pymox/) to Python 3. It was meant to be as compatible
with mox as possible, but small enhancements have been made. The library was
tested on Python version 3.2, 2.7 and 2.6.
Use at your own risk ;)
To install:
$ python setup.py install
To run Mox's internal tests:
To run Mox3 internal tests you should download python-nose package and execute
(in mox3 directory):
$ python mox_test.py
$ nosetests
The basic usage of mox3 is the same as with mox, but the initial import should
be made from the mox3 module:
Basic usage:
from mox3 import mox
import unittest
import mox
class PersonTest(mox.MoxTestBase):
def testUsingMox(self):
# Create a mock Person
mock_person = self.mox.CreateMock(Person)
test_person = ...
test_primary_key = ...
unknown_person = ...
# Expect InsertPerson to be called with test_person; return
# test_primary_key at that point
mock_person.InsertPerson(test_person).AndReturn(test_primary_key)
# Raise an exception when this is called
mock_person.DeletePerson(unknown_person).AndRaise(UnknownPersonError())
# Switch from record mode to replay mode
self.mox.ReplayAll()
# Run the test
ret_pk = mock_person.InsertPerson(test_person)
self.assertEquals(test_primary_key, ret_pk)
self.assertRaises(UnknownPersonError, mock_person, unknown_person)
For more documentation, see:
To learn how to use mox3 you may check the documentation of the original mox
framework:
http://code.google.com/p/pymox/wiki/MoxDocumentation
For more information, see:
http://code.google.com/p/pymox/
Our user and developer discussion group is:
http://groups.google.com/group/mox-discuss
--
Mox is Copyright 2008 Google Inc, and licensed under the Apache
License, Version 2.0; see the file COPYING for details. If you would
like to help us improve Mox, join the group.
This is a modified version from https://github.com/quermit/pymox

View File

@ -25,10 +25,10 @@ setup(name='mox3',
maintainer='quermit',
maintainer_email='quermit@gmail.com',
license='Apache License, Version 2.0',
description='Mock object framework (forked from the mox framework)',
long_description=('Mox3 is a mock object framework for Python 3 based on '
'the Google mox framework. The library should work '
'well with Python 3.2, 2.7 and 2.6'),
description='Mock object framework for Python 3',
long_description=('Mox3 is an unofficial port of the of the mox '
'framework to Python 3. The library was tested on '
'Python version 3.2, 2.7 and 2.6.'),
classifiers=['Programming Language :: Python',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 2.6',