update tests and add long description to setup

This commit is contained in:
iuvbio 2019-01-30 23:25:37 +01:00
parent a140a5d4b9
commit f6ed9d088f
2 changed files with 34 additions and 33 deletions

View File

@ -1,24 +1,30 @@
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():
class OdsReaderTest(object):
def test_header_file_with_int():
example = "example_headers.ods"
path = os.path.join(root, example)
print("Test sheet by index")
# print("Test sheet by index")
df = read_ods(path, 1)
print(df)
print("Test sheet by name")
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():
def test_no_header_file():
example = "example_no_headers.ods"
path = os.path.join(root, example)
print("Test sheet by index and default columns")
@ -31,13 +37,3 @@ def test_no_header_file():
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)

View File

@ -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',