Updated tests to use nose.

This commit is contained in:
Donne Martin
2015-06-20 16:25:47 -04:00
parent 0dd0b98f1b
commit 32ae488a45

View File

@@ -90,12 +90,19 @@
},
"outputs": [],
"source": [
"def test():\n",
" print(unique_chars(''))\n",
" print(unique_chars('foo'))\n",
" print(unique_chars('bar'))\n",
"from nose.tools import assert_equal\n",
"\n",
"test()"
"class Test(object):\n",
" def test_unique_chars(self):\n",
" assert_equal(unique_chars(''), True)\n",
" assert_equal(unique_chars('foo'), False)\n",
" assert_equal(unique_chars('bar'), True) \n",
"\n",
"def run_tests():\n",
" test = Test()\n",
" test.test_unique_chars()\n",
"\n",
"run_tests()"
]
},
{
@@ -146,7 +153,7 @@
" chars_set.add(char)\n",
" return True\n",
"\n",
"test()"
"run_tests()"
]
},
{
@@ -189,7 +196,7 @@
" return False\n",
" return True\n",
"\n",
"test()"
"run_tests()"
]
}
],