-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix isinstance calls and add some tests (#115)
* fix isinstance calls and add some tests * docstrings for new tests * now using pandas in tests
- Loading branch information
Showing
7 changed files
with
39 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
"""Interactive dashboard toolkit.""" | ||
|
||
__version__ = '0.3.0' | ||
__version__ = '0.3.1-dev' | ||
|
||
from bowtie._layout import Layout | ||
from bowtie._command import command |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
"""Serialization testing.""" | ||
|
||
import numpy as np | ||
import pandas as pd | ||
|
||
from bowtie._component import jdumps, pack | ||
|
||
|
||
NPARRAY = np.array([5, 6]) | ||
NPSCALAR = np.int32(5) | ||
DATES = pd.date_range('2017-01-01', periods=2) | ||
|
||
|
||
def test_json(): | ||
"""Tests json encoding numpy and pandas.""" | ||
assert jdumps(NPARRAY) == jdumps([5, 6]) | ||
assert jdumps(NPSCALAR) == jdumps(5) | ||
assert jdumps(DATES) == jdumps(['2017-01-01T00:00:00', '2017-01-02T00:00:00']) | ||
|
||
|
||
def test_msgpack(): | ||
"""Tests msgpack encoding numpy and pandas.""" | ||
assert pack(NPARRAY) == pack([5, 6]) | ||
assert pack(NPSCALAR) == pack(5) | ||
assert pack(DATES) == pack(['2017-01-01T00:00:00', '2017-01-02T00:00:00']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ jinja2 | |
markdown | ||
msgpack-python | ||
numpy | ||
pandas | ||
plotlywrapper | ||
pydocstyle | ||
pylint | ||
|