From 9066712dca21ef35c534e068f2cc4fefdccf1ea3 Mon Sep 17 00:00:00 2001 From: Michael Trier Date: Wed, 7 May 2008 22:37:17 -0400 Subject: Moved test stuff around and modified imports to just clean things up a bit. --- test/asserts.py | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 test/asserts.py (limited to 'test/asserts.py') diff --git a/test/asserts.py b/test/asserts.py deleted file mode 100644 index 33dd843b..00000000 --- a/test/asserts.py +++ /dev/null @@ -1,32 +0,0 @@ -import re -import unittest -from nose import tools -from nose.tools import * - -__all__ = ['assert_instance_of', 'assert_not_instance_of', - 'assert_none', 'assert_not_none', - 'assert_match', 'assert_not_match'] + tools.__all__ - -def assert_instance_of(expected, actual, msg=None): - """Verify that object is an instance of expected """ - assert isinstance(actual, expected), msg - -def assert_not_instance_of(expected, actual, msg=None): - """Verify that object is not an instance of expected """ - assert not isinstance(actual, expected, msg) - -def assert_none(actual, msg=None): - """verify that item is None""" - assert_equal(None, actual, msg) - -def assert_not_none(actual, msg=None): - """verify that item is None""" - assert_not_equal(None, actual, msg) - -def assert_match(pattern, string, msg=None): - """verify that the pattern matches the string""" - assert_not_none(re.search(pattern, string), msg) - -def assert_not_match(pattern, string, msg=None): - """verify that the pattern does not match the string""" - assert_none(re.search(pattern, string), msg) \ No newline at end of file -- cgit v1.2.1