diff --git a/pandas_ods_reader/tests/test_read_ods.py b/pandas_ods_reader/tests/test_read_ods.py index a739268..19a52b4 100644 --- a/pandas_ods_reader/tests/test_read_ods.py +++ b/pandas_ods_reader/tests/test_read_ods.py @@ -1,43 +1,39 @@ import os import sys +import pandas as pd + from pandas_ods_reader import read_ods root = os.path.dirname(os.path.abspath(__file__)) -def test_header_file(): - example = "example_headers.ods" - path = os.path.join(root, example) - print("Test sheet by index") - df = read_ods(path, 1) - print(df) - print("Test sheet by name") - df = read_ods(path, "Sheet1") - print(df) +class OdsReaderTest(object): + def test_header_file_with_int(): + example = "example_headers.ods" + path = os.path.join(root, example) + # print("Test sheet by index") + df = read_ods(path, 1) + assert isinstance(df, pd.DataFrame) + def test_header_file_with_str(): + example = "example_headers.ods" + path = os.path.join(root, example) + df = read_ods(path, "Sheet1") + print(df) + assert isinstance(df, pd.DataFrame) -def test_no_header_file(): - example = "example_no_headers.ods" - path = os.path.join(root, example) - print("Test sheet by index and default columns") - df = read_ods(path, 1, headers=False) - print(df) - print("Test sheet by name and default columns") - df = read_ods(path, "Sheet1", headers=False) - print(df) - print("Test sheet by index and specific columns") - columns = ["A", "B", "C", "D", "E"] - df = read_ods(path, 1, headers=False, columns=columns) - print(df) - - -def main(): - test_header_file() - test_no_header_file() - - -if __name__ == "__main__": - status = main() - sys.exit(status) + def test_no_header_file(): + example = "example_no_headers.ods" + path = os.path.join(root, example) + print("Test sheet by index and default columns") + df = read_ods(path, 1, headers=False) + print(df) + print("Test sheet by name and default columns") + df = read_ods(path, "Sheet1", headers=False) + print(df) + print("Test sheet by index and specific columns") + columns = ["A", "B", "C", "D", "E"] + df = read_ods(path, 1, headers=False, columns=columns) + print(df) diff --git a/setup.py b/setup.py index 430dfa0..d028a44 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,16 @@ from setuptools import setup, find_packages -VERSION = "0.0.3" +VERSION = "0.0.4" + +with open("README.md", "r") as fh: + long_description = fh.read() setup(name="pandas_ods_reader", version=VERSION, description="Read in an ODS file and return it as a pandas.DataFrame", + long_description=long_description, + long_description_content_type="text/markdown", classifiers=[ 'Development Status :: 3 - Alpha', 'License :: OSI Approved :: MIT License',