#!/usr/bin/env python
# Check utils.parse_changes()'s for handling empty files
-# Copyright (C) 2000 James Troup <james@nocrew.org>
-# $Id: test.py,v 1.1 2001-03-02 02:31:07 troup Exp $
+# Copyright (C) 2000, 2006 James Troup <james@nocrew.org>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
import os, sys
-sys.path.append(os.path.abspath('../../'));
+sys.path.append(os.path.abspath('../../'))
import utils
################################################################################
def fail(message):
- sys.stderr.write("%s\n" % (message));
- sys.exit(1);
-
+ sys.stderr.write("%s\n" % (message))
+ sys.exit(1)
+
################################################################################
def main ():
utils.parse_changes('empty.changes', 0)
except utils.changes_parse_error_exc, line:
if line != "[Empty changes file]":
- fail("Returned exception with unexcpected error message `%s'." % (line));
+ fail("Returned exception with unexcpected error message `%s'." % (line))
else:
- fail("Didn't raise a 'parse error' exception for a zero-length .changes file.");
+ fail("Didn't raise a 'parse error' exception for a zero-length .changes file.")
################################################################################