1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
Description: Allow running tests without nose
Author: Mohammed Bilal <mdbilal@disroot.org>
Forwarded: https://github.com/wolever/parameterized/pull/145
Last-Update: 2022-12-03
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/parameterized/test.py
+++ b/parameterized/test.py
@@ -3,13 +3,18 @@
import inspect
import mock
from unittest import TestCase
-from nose.tools import assert_equal, assert_raises
from .parameterized import (
PY3, PY2, parameterized, param, parameterized_argument_value_pairs,
short_repr, detect_runner, parameterized_class, SkipTest,
)
+def assert_equal(*args, **kwds):
+ return TestCase().assertEqual(*args, **kwds)
+
+def assert_raises(*args, **kwds):
+ return TestCase().assertRaises(*args, **kwds)
+
def assert_contains(haystack, needle):
if needle not in haystack:
raise AssertionError("%r not in %r" %(needle, haystack))
|