File: remove-nosetest.patch

package info (click to toggle)
python-parameterized 0.8.1-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 388 kB
  • sloc: python: 914; makefile: 3
file content (28 lines) | stat: -rw-r--r-- 917 bytes parent folder | download
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))