#273: Remove nose dependency for bit_manipulation/ (#279)

This commit is contained in:
Donne Martin
2020-07-12 11:56:55 -04:00
committed by GitHub
parent d488e4f355
commit dce6b6aa67
24 changed files with 242 additions and 324 deletions

View File

@@ -82,9 +82,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"class Bits(object):\n",
@@ -111,27 +109,25 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"# %load test_print_binary.py\n",
"from nose.tools import assert_equal\n",
"import unittest\n",
"\n",
"\n",
"class TestBits(object):\n",
"class TestBits(unittest.TestCase):\n",
"\n",
" def test_print_binary(self):\n",
" bit = Bits()\n",
" assert_equal(bit.print_binary(None), 'ERROR')\n",
" assert_equal(bit.print_binary(0), 'ERROR')\n",
" assert_equal(bit.print_binary(1), 'ERROR')\n",
" self.assertEqual(bit.print_binary(None), 'ERROR')\n",
" self.assertEqual(bit.print_binary(0), 'ERROR')\n",
" self.assertEqual(bit.print_binary(1), 'ERROR')\n",
" num = 0.625\n",
" expected = '0.101'\n",
" assert_equal(bit.print_binary(num), expected)\n",
" self.assertEqual(bit.print_binary(num), expected)\n",
" num = 0.987654321\n",
" assert_equal(bit.print_binary(num), 'ERROR')\n",
" self.assertEqual(bit.print_binary(num), 'ERROR')\n",
" print('Success: test_print_binary')\n",
"\n",
"\n",
@@ -170,9 +166,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
}