add simple tests and timing code

The tests here may not be much use to you, but typing them out was useful to me in examining the library's workings. There are two files, meant for use with `pytest`:

 * `test_docs_content.py` reproduces most of the tests in the docstrings.
 * `test_large_lists.py` creates some large lists and tests `inverse` and `get_item` on their instantiations as `bidict`s.

The little timing program shows me how much slower `bidict` is than just creating a reversed dictionary. Of course, creation happens only once, and after that there are considerable savings in space and functionality. I am not suggesting any changes to `bidict` on account of this — I just wanted to see the difference in timing.

```python
>>> import time_manual_reverse_dict as M
>>> M.main(200)
Example with int: str.
In 200 trials, average time for a list of cardinality 100000:
    bidict:        1.8498 sec.
    reversed dict: 0.0349 sec.

Example with str: int.
In 200 trials, average time for a list of cardinality 100000:
    bidict:        1.8675 sec.
    reversed dict: 0.0378 sec.
>>>
```
Wow — did you see this?

… the time of execution [measured by timeit] with garbage collection is
> magnitude bigger than the one without
>

http://stackoverflow.com/a/8731619/621762

It shouldn't surprise me, but I see the weakness of relying on time.time.

- dpb

On Sat, Sep 27, 2014 at 11:00 AM, jab <notifications@github.com> wrote:

> In timing/time_manual_reverse_dict.py:
>
> > +# David Prager Branner
> > +# 20140925
> > +
> > +import bidict as B
> > +import time
> > +import random
> > +import string
> > +
> > +
> > +def main(trials=10, card=100000, hi_lo = 10000000):
> > +    # Example with int: str
> > +    total_time_bidict = 0
> > +    total_time_revdict = 0
> > +    for i in range(trials):
> > +        start_time = time.time()
> > +        ints_to_strs = construct_ints_to_strs(card, hi_lo)
>
> I'm not sure these tests are sound. For one thing, you're including this
> construct_ints_to_strs() call between the two time() calls for bidict,
> which drastically skews the bidict results. Look at the drastic effects of
> just moving this line outside the two the time() calls (i.e. swapping it
> with the line above it):
>
> In [1]: from time_manual_reverse_dict import main
>
> In [2]: main(200)
> Example with int: str.
> In 200 trials, average time for a list of cardinality 100000:
>     bidict:        0.2967 sec.
>     reversed dict: 0.0447 sec.
>
> (Compare with your results
> <https://github.com/jab/bidict/pull/1#issue-43952165>.)
>
> I'll link you to my performance tests when I get a chance to write them if
> you'd like to compare. I'm going to use timeit
> <https://docs.python.org/2/library/timeit.html>, hotshot
> <https://docs.python.org/2/library/hotshot.html>, and/or other
> special-purpose performance testing modules rather than time.time.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/jab/bidict/pull/1/files#r18123986>.
>