Mercurial > hgsubversion
comparison tests/util.py @ 14:d78dbf88c13d
Started a meaningful test suite.
| author | Augie Fackler <durin42@gmail.com> |
|---|---|
| date | Tue, 07 Oct 2008 18:42:43 -0500 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 13:e60bd31f58a7 | 14:d78dbf88c13d |
|---|---|
| 1 import os | |
| 2 import popen2 | |
| 3 | |
| 4 FIXTURES = os.path.join(os.path.abspath(os.path.dirname(__file__)), | |
| 5 'fixtures') | |
| 6 | |
| 7 def load_svndump_fixture(path, fixture_name): | |
| 8 '''Loads an svnadmin dump into a fresh repo at path, which should not | |
| 9 already exist. | |
| 10 ''' | |
| 11 os.spawnvp(os.P_WAIT, 'svnadmin', ['svnadmin', 'create', path,]) | |
| 12 proc = popen2.Popen4(['svnadmin', 'load', path,]) | |
| 13 inp = open(os.path.join(FIXTURES, fixture_name)) | |
| 14 proc.tochild.write(inp.read()) | |
| 15 proc.tochild.close() | |
| 16 proc.wait() |
