python/unittest/TypeError: __init__() takes 1 positional argument but 2 were given.md
... ...
@@ -35,4 +35,10 @@ TypeError: __init__() takes 1 positional argument but 2 were given
35 35
```
36 36
37 37
### 解決法
38
-[python - __init__ for unittest.TestCase - Stack Overflow](https://stackoverflow.com/questions/17353213/init-for-unittest-testcase)
... ...
\ No newline at end of file
0
+[python - __init__ for unittest.TestCase - Stack Overflow](https://stackoverflow.com/questions/17353213/init-for-unittest-testcase)
1
+
2
+```python
3
+class TestClass(unittest.TestCase):
4
+ def __init__(self, *args, **kwargs):
5
+ super(TestClass, self).__init__(*args, **kwargs)
6
+```
... ...
\ No newline at end of file