Files
deb-python-pygit2/test
Fraser Tweedale 74b1628e51 test utils: implement a repo context manager
The current hierarchy of test cases that create and blow away test
repositories in the ``setUp`` and ``tearDown`` methods is inadequate
for testing scenarios where multiple repositories must be edited,
e.g.  testing push.

Extract the temporary repository behaviour into a context manager
class ``TemporaryRepository`` which can be used via the ``with``
keyword.  The context manager's ``__enter__` method returns creates
the specified repository in a temporary directory and returns its
path.  The temporary directory is removed in ``__exit__``.

Update the existing test case base classes to use the context
manager and invoke ``__enter__`` and ``__exit__`` in the ``setUp``
and ``tearDown`` methods respectively.

Finally, make some small tweaks to a handful of tests to get them
working under this new system.
2013-08-30 17:25:18 +10:00
..
2013-03-11 20:48:57 +01:00
2013-05-26 14:39:12 +02:00
2013-05-26 14:39:12 +02:00
2013-05-26 14:39:12 +02:00
2013-06-29 12:38:41 +02:00
2013-05-26 14:39:12 +02:00
2013-08-14 20:13:03 -07:00
2013-05-26 14:39:12 +02:00