Skip to content

Commit

Permalink
fix import
Browse files Browse the repository at this point in the history
  • Loading branch information
tompollard committed May 6, 2020
1 parent 98615ba commit fabcd16
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
1 change: 0 additions & 1 deletion tableone/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Import tableone objects
from .tableone import TableOne
from .modality import hartigan_diptest

__author__ = "Tom Pollard <[email protected]>, Alistair Johnson, Jesse Raffa"
__version__ = "0.7.3"
2 changes: 1 addition & 1 deletion tableone/tableone.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from statsmodels.stats import multitest
from tabulate import tabulate

from tableone import hartigan_diptest
from tableone.modality import hartigan_diptest

# display deprecation warnings
warnings.simplefilter('always', DeprecationWarning)
Expand Down
14 changes: 7 additions & 7 deletions test_tableone.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
from nose.tools import (with_setup, assert_raises, assert_equal,
assert_almost_equal)
import numpy as np
import modality
import pandas as pd
from scipy import stats

import tableone
from tableone import TableOne
from tableone.tableone import InputError
from tableone.modality import hartigan_diptest, generate_data


def mytest(*args):
Expand Down Expand Up @@ -297,16 +297,16 @@ def test_hartigan_diptest_for_modality(self):
Ensure that the package runs Fisher exact if cell counts are <=5
and it is a 2x2
"""
dist_1_peak = modality.generate_data(peaks=1, n=[10000])
t1 = modality.hartigan_diptest(dist_1_peak)
dist_1_peak = generate_data(peaks=1, n=[10000])
t1 = hartigan_diptest(dist_1_peak)
assert t1 > 0.95

dist_2_peak = modality.generate_data(peaks=2, n=[10000, 10000])
t2 = modality.hartigan_diptest(dist_2_peak)
dist_2_peak = generate_data(peaks=2, n=[10000, 10000])
t2 = hartigan_diptest(dist_2_peak)
assert t2 < 0.05

dist_3_peak = modality.generate_data(peaks=3, n=[10000, 10000, 10000])
t3 = modality.hartigan_diptest(dist_3_peak)
dist_3_peak = generate_data(peaks=3, n=[10000, 10000, 10000])
t3 = hartigan_diptest(dist_3_peak)
assert t3 < 0.05

@with_setup(setup, teardown)
Expand Down

0 comments on commit fabcd16

Please sign in to comment.