view publish.py @ 23:c1f52b5d80d6

Compatibility and bug fixes -1 command line option added (currently only detects the presence of test groups). The ansname configuration variable is now (again) optional when output validators are used. Bug fix: path realization only looked at paths beginning with tests/. Bug fix: non-reiterable values of the tests configuration variable are now handled correctly. Bug fix: an exceptions was raised if a problem had no test cases.
author Oleg Oshmyan <chortos@inbox.lv>
date Wed, 22 Sep 2010 23:34:51 +0000
parents a2c9f7cfa174
children
line wrap: on
line source

#! /usr/bin/python
# Copyright (c) 2009-2010 Chortos-2 <chortos@inbox.lv>

with open('test-svn.py') as t:
	f = t.read()
i = f.find('# $Rev: ')
j = f.find('\n', i)
rev = f[i+8:j-2]
f = f[0:i] + f[j+1:]
f = f.replace('$$REV$$', rev)
with open('test.py', 'wb') as t:
	t.write(f)