Skip to content

ImportError due to importing tests that depend on pandas #4

@johnyf

Description

@johnyf

The module ballpark.__init__ imports ballpark.tests (no need to import tests at runtime), and the module ballpark.tests imports pandas, which is absent from install_requires. As a result, after installing with pip:

In [3]: import ballpark
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-3-21d6fb214fd5> in <module>()
----> 1 import ballpark

/.../site-packages/ballpark/__init__.py in <module>()
----> 1 from . import notation, shortcuts, statistics, tests
      2 from .notation import order, extent
      3 from .notation import scientific, engineering, business
      4 from .utils import quantize, floor, ceil, round
      5 

/.../site-packages/ballpark/tests.py in <module>()
      4 import unittest
      5 
----> 6 import pandas
      7 
      8 from . import notation

ImportError: No module named 'pandas'

Not importing any tests at runtime, and adding tests_require=['pandas'] in the setup.py should address this issue. Relevant to #3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions