summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrzemyslaw Gajda <quermit@gmail.com>2012-04-30 22:36:52 +0200
committerPrzemyslaw Gajda <quermit@gmail.com>2012-04-30 22:36:52 +0200
commit1e965c9d026ff7299a33a0f18f01163484dc514e (patch)
tree06646648a7cfde8d658d9366fafb979a566c06c0
parente5bec16ee550e4c1d7da00e9d08c0f37ef1e7d33 (diff)
downloadpymox-1e965c9d026ff7299a33a0f18f01163484dc514e.tar.gz
Changed project description.mox3_init
-rw-r--r--README.txt62
-rw-r--r--setup.py8
2 files changed, 22 insertions, 48 deletions
diff --git a/README.txt b/README.txt
index 7b65393..0c7badc 100644
--- a/README.txt
+++ b/README.txt
@@ -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.
-To install:
-
- $ python setup.py install
-
-To run Mox's internal tests:
-
- $ python mox_test.py
-
-Basic usage:
-
- import unittest
- import mox
-
- class PersonTest(mox.MoxTestBase):
+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.
- def testUsingMox(self):
- # Create a mock Person
- mock_person = self.mox.CreateMock(Person)
+Use at your own risk ;)
- test_person = ...
- test_primary_key = ...
- unknown_person = ...
+To install:
- # Expect InsertPerson to be called with test_person; return
- # test_primary_key at that point
- mock_person.InsertPerson(test_person).AndReturn(test_primary_key)
+ $ python setup.py install
- # Raise an exception when this is called
- mock_person.DeletePerson(unknown_person).AndRaise(UnknownPersonError())
+To run Mox3 internal tests you should download python-nose package and execute
+(in mox3 directory):
- # Switch from record mode to replay mode
- self.mox.ReplayAll()
+ $ nosetests
+
+The basic usage of mox3 is the same as with mox, but the initial import should
+be made from the mox3 module:
- # Run the test
- ret_pk = mock_person.InsertPerson(test_person)
- self.assertEquals(test_primary_key, ret_pk)
- self.assertRaises(UnknownPersonError, mock_person, unknown_person)
+ from mox3 import mox
-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
diff --git a/setup.py b/setup.py
index e9dbab3..a28ada2 100644
--- a/setup.py
+++ b/setup.py
@@ -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',