#273: Remove nose dependency for online_judges/ (#282)

This commit is contained in:
Donne Martin
2020-07-14 21:34:08 -04:00
committed by GitHub
parent 67505c49b2
commit 46d3939632
60 changed files with 575 additions and 782 deletions

View File

@@ -116,9 +116,7 @@
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"class Solution(object):\n",
@@ -143,9 +141,7 @@
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
@@ -157,17 +153,17 @@
],
"source": [
"%%writefile test_sum_two.py\n",
"from nose.tools import assert_equal, assert_raises\n",
"import unittest\n",
"\n",
"\n",
"class TestSumTwo(object):\n",
"class TestSumTwo(unittest.TestCase):\n",
"\n",
" def test_sum_two(self):\n",
" solution = Solution()\n",
" assert_raises(TypeError, solution.sum_two, None)\n",
" assert_equal(solution.sum_two(5, 7), 12)\n",
" assert_equal(solution.sum_two(-5, -7), -12)\n",
" assert_equal(solution.sum_two(5, -7), -2)\n",
" self.assertRaises(TypeError, solution.sum_two, None)\n",
" self.assertEqual(solution.sum_two(5, 7), 12)\n",
" self.assertEqual(solution.sum_two(-5, -7), -12)\n",
" self.assertEqual(solution.sum_two(5, -7), -2)\n",
" print('Success: test_sum_two')\n",
"\n",
"\n",
@@ -184,7 +180,6 @@
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false,
"scrolled": true
},
"outputs": [
@@ -217,9 +212,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.0"
"version": "3.7.2"
}
},
"nbformat": 4,
"nbformat_minor": 0
"nbformat_minor": 1
}