The Team Repository View

The team repository view supplants most of the Subversion status operations we looked at earlier in the chapter. It shows how the repository is different from your working copy, and how your working copy is different from the repository. It can combine those views showing all changes, or it can show only files with conflicts. It can show the aggregate changes, or it can break the differences down by revision. Open the repository view by choosing the menu item Window gt Open View gt Other. This...

The Data Mapper Pattern

The data mapper pattern maps columns into arbitrary objects. The underlying structure is described, and then the mappings are specified between the storage entities and the application objects. This indirection separates the database from the application. The storage format can be altered, while the objects remain the same, and vice versa. Changing the database structure no longer necessitates changing the application code, and arbitrary SQL results can be sensibly mapped. On the other hand,...

A Simple pMock Example

pMock is installed with the command easy_install pmock. It's a pure Python package, so there's no compilation necessary, and it should work on any system. A simple test shows how to use pMock. The example will calculate a triangle's perimeter assert_equals 4, perimeter triangle def test_perimeter triangle Mock assert_equals 4, perimeter triangle The expected method calls triangle.side 0 and triangle.side l need to be modeled. They return 1 and 3, respectively. def test_perimeter triangle Mock

T

Table method, SQLAlchemy, 284 tables creating tables, SQLObject, 270 many-to-many relationships, SQLAlchemy, 293 many-to-many relationships, SQLObject, 277 multiple relationships, SQLObject, 280 one-to-many relationships, SQLAlchemy, 291 one-to-many relationships, SQLObject, 275 job management system, 22 TDD test-driven development , 10-11, 146-147 description, 173 implicit goal, 218 using mock objects pMock, 195-212 PyMock, 212-228 team providers, 59 team repository view, 65-68 tearDown method...

Sharing Your Subverted Project

There are several ways of getting your project into Eclipse Importing directly from Subversion. Importing a project that has already been checked out via the command line. Sharing a project that has already been checked out. Exporting your project directly to Subversion. Adding sharing to a project that has not been yet been checked out. Sadly, this is broken for file URLs in Subversive. You're going to import your project directly from Subversion. This is the most frequent way that you'll...

Using Wxpython Wsgi

The Web Server Gateway Interface WSGI pronounced whiskey defines a simple interface between web servers and Python web applications. It is defined in PEP 333. Adapters are written from the web servers to WSGI, so applications only have to support a connection to WSGI. Over the last few years, WSGI has become ubiquitous. On the server side, it is supported by Apache, CherryPy, LightHTTPd, and Zope, among others. On the app server side, it is supported by CherryPy, Django, Pylons, Turbogears,...

Running PyFit

PyFit supplies many different programs for running tests. These are located in tools pyfit fit. You want FolderRunner.py, which reads requirement documents from one directory and writes the finished reports to another. FolderRunner.py came from a ZIP file, and on UNIX systems this means that the execute bit isn't set, so you'll have to call Python to run it. python tools pyfit fit FolderRunner.py acceptance requirements acceptance reports Result print level in effect. Files 'e' Summaries 't'...

Contacting Me

Finally, please don't hesitate to give me feedback on the book at any time. This is my first book, my writing ability has improved immensely as the book has progressed, and I now have a much better understanding of what I wanted to say than when I started. I'll try to improve any sections that people find lacking and publish them to this book's web page at http www. apress.com book view 9781590599815. Additional materials may be available on my blog www.theblobshop.com blog under the tag famip....

Importing from Subversion

Once you've installed Subversive and restarted Eclipse, you can import from the repository. Select File gt Import, which will bring up the Import project window, shown in Figure 3-3. Figure 3-3. Importing an existing project Figure 3-3. Importing an existing project Select SVN gt Projects from SVN, and then click the Next button. This will take you to the repository selection screen, shown in Figure 3-4. Checkout Project from SVN repository Select an existing repository location or create a new...

Implementing with PyMock

The implementation with PyMock largely mirrors the pMock implementation, but there are significant differences. Monkeypatching eliminates the necessity of introducing a second variable to hold the mock. Instead, the mocked method is attached directly to an instance using the override function. This leads to a simpler call structure. Monkeypatching also allows tests to mock external modules in place. In cases where the dependencies are never expected to change, this leads to a simpler...

factory pythonBuilder 1

After doing this, you should reload the Buildbot configuration to see if you've introduced any errors master buildbot reconfig usr local buildbot master rsreader 2008-05-05 15 59 56-0700 - loading configuration from usr local buildbot master 2008-05-05 15 59 56-0700 - updating builder buildbot-full-py2.4 factory changed Reconfiguration appears to have completed successfully. The reconfig worked, so you can safely continue. The new builder must be scheduled. Here is the section of master.cfg...

Coercion at the Keyboard

Pydev offers a variety of features to assist with writing and analyzing code. These features include the following All of these features are configured from the Eclipse Preferences window. On the Mac, you open it by selecting Eclipse gt Preferences. On Windows, it is under Window gt Preferences. Autoformatting is one of the most useful but least contemplated features. Pydev offers several settings, all of which have defaults conforming with PEP 8. The most important of these are the indentation...