Improved code quality.
This commit is contained in:
parent
6afef2cd43
commit
408ebc3236
|
@ -8,7 +8,7 @@
|
||||||
[![License](https://img.shields.io/pypi/l/python-benedict.svg)](https://img.shields.io/pypi/l/python-benedict.svg)
|
[![License](https://img.shields.io/pypi/l/python-benedict.svg)](https://img.shields.io/pypi/l/python-benedict.svg)
|
||||||
|
|
||||||
# python-benedict
|
# python-benedict
|
||||||
python-benedict is the Python dictionary for humans dealing with evil data.
|
python-benedict is the Python dictionary for humans dealing with evil/complex data.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
- Full **keypath** support *(using the dot syntax)*
|
- Full **keypath** support *(using the dot syntax)*
|
||||||
|
|
|
@ -5,7 +5,7 @@ python-benedict
|
||||||
===============
|
===============
|
||||||
|
|
||||||
python-benedict is the Python dictionary for humans dealing with
|
python-benedict is the Python dictionary for humans dealing with
|
||||||
evil data.
|
evil/complex data.
|
||||||
|
|
||||||
Features
|
Features
|
||||||
--------
|
--------
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
__author__ = 'Fabio Caccamo'
|
__author__ = 'Fabio Caccamo'
|
||||||
__copyright__ = 'Copyright (c) 2019 Fabio Caccamo'
|
__copyright__ = 'Copyright (c) 2019 Fabio Caccamo'
|
||||||
__description__ = 'python-benedict is the Python dictionary for humans dealing with evil data.'
|
__description__ = 'python-benedict is the Python dictionary for humans dealing with evil/complex data.'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__title__ = 'benedict'
|
__title__ = 'benedict'
|
||||||
__version__ = '0.2.0'
|
__version__ = '0.2.0'
|
|
@ -140,7 +140,7 @@ class BenedictKeypathDictTestCase(unittest.TestCase):
|
||||||
}
|
}
|
||||||
b = benedict(d)
|
b = benedict(d)
|
||||||
with self.assertRaises(KeyError):
|
with self.assertRaises(KeyError):
|
||||||
val = b['b']
|
b['b']
|
||||||
|
|
||||||
def test_getitem_with_1_not_str_key(self):
|
def test_getitem_with_1_not_str_key(self):
|
||||||
d = {
|
d = {
|
||||||
|
@ -152,7 +152,7 @@ class BenedictKeypathDictTestCase(unittest.TestCase):
|
||||||
self.assertEqual(b[None], None)
|
self.assertEqual(b[None], None)
|
||||||
self.assertEqual(b[False], False)
|
self.assertEqual(b[False], False)
|
||||||
with self.assertRaises(KeyError):
|
with self.assertRaises(KeyError):
|
||||||
val = b[True]
|
b[True]
|
||||||
self.assertEqual(b[0], 0)
|
self.assertEqual(b[0], 0)
|
||||||
|
|
||||||
def test_get_with_2_valid_keys(self):
|
def test_get_with_2_valid_keys(self):
|
||||||
|
@ -190,7 +190,7 @@ class BenedictKeypathDictTestCase(unittest.TestCase):
|
||||||
}
|
}
|
||||||
b = benedict(d)
|
b = benedict(d)
|
||||||
with self.assertRaises(KeyError):
|
with self.assertRaises(KeyError):
|
||||||
val = b['b.a']
|
b['b.a']
|
||||||
|
|
||||||
def test_get_with_3_valid_keys(self):
|
def test_get_with_3_valid_keys(self):
|
||||||
d = {
|
d = {
|
||||||
|
@ -235,7 +235,7 @@ class BenedictKeypathDictTestCase(unittest.TestCase):
|
||||||
}
|
}
|
||||||
b = benedict(d)
|
b = benedict(d)
|
||||||
with self.assertRaises(KeyError):
|
with self.assertRaises(KeyError):
|
||||||
val = b['c.b.a']
|
b['c.b.a']
|
||||||
|
|
||||||
def test_has_with_1_key(self):
|
def test_has_with_1_key(self):
|
||||||
d = {
|
d = {
|
||||||
|
|
Loading…
Reference in New Issue