#273: Remove nose dependency for arrays_strings/ (#274)

This commit is contained in:
Donne Martin
2020-07-04 10:56:49 -04:00
committed by GitHub
parent 9678c5ee69
commit b598f474af
34 changed files with 399 additions and 481 deletions

View File

@@ -94,9 +94,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"class Solution(object):\n",
@@ -123,21 +121,19 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"# %load test_fizz_buzz.py\n",
"from nose.tools import assert_equal, assert_raises\n",
"import unittest\n",
"\n",
"\n",
"class TestFizzBuzz(object):\n",
"class TestFizzBuzz(unittest.TestCase):\n",
"\n",
" def test_fizz_buzz(self):\n",
" solution = Solution()\n",
" assert_raises(TypeError, solution.fizz_buzz, None)\n",
" assert_raises(ValueError, solution.fizz_buzz, 0)\n",
" self.assertRaises(TypeError, solution.fizz_buzz, None)\n",
" self.assertRaises(ValueError, solution.fizz_buzz, 0)\n",
" expected = [\n",
" '1',\n",
" '2',\n",
@@ -155,7 +151,7 @@
" '14',\n",
" 'FizzBuzz'\n",
" ]\n",
" assert_equal(solution.fizz_buzz(15), expected)\n",
" self.assertEqual(solution.fizz_buzz(15), expected)\n",
" print('Success: test_fizz_buzz')\n",
"\n",
"\n",
@@ -194,9 +190,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.4.3"
"version": "3.7.2"
}
},
"nbformat": 4,
"nbformat_minor": 0
"nbformat_minor": 1
}