Skip to content

Fix unit tests #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 25, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
.coverage
pyexcel*-info
build
dist
dist
tmp.db
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ python:
- 2.7
- 3.3
- 3.4
- 3.5
- pypy
install:
- if [[ $TRAVIS_PYTHON_VERSION == "2.6" ]]; then pip install ordereddict; fi
- python setup.py install
- pip install git+https://github.com/chfw/pyexcel-xls.git
- pip install git+https://github.com/chfw/pyexcel.git
- pip install -r tests/requirements.txt
script:
make test
Expand Down
2 changes: 1 addition & 1 deletion pyexcel_io/csvbook.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def close(self):
"""
This call close the file handle
"""
if not (isinstance(self.f, StringIO) and isinstance(self.f, BytesIO)):
if not (isinstance(self.f, StringIO) or isinstance(self.f, BytesIO)):
self.f.close()
elif not self.single_sheet_in_book:
self.f.write("---pyexcel---\r\n")
Expand Down
6 changes: 6 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
if sys.version_info[0] == 2 and sys.version_info[1] < 7:
dependencies.append('ordereddict')

extras = {
'xls': ['pyexcel-xls>=0.0.7'],
'xlsx': ['pyexcel-xlsx>=0.0.7'],
}

setup(
name='pyexcel-io',
author="C. W.",
Expand All @@ -22,6 +27,7 @@
url="https://github.com/chfw/pyexcel-io",
description='A python library to read and write structured data in csv, zipped csv format and to/from databases',
install_requires=dependencies,
extras_require=extras,
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
include_package_data=True,
long_description=README_txt,
Expand Down
3 changes: 2 additions & 1 deletion tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ nose-cov
python-coveralls
coverage
SQLAlchemy
pyexcel-xls
pyexcel-xls>=0.0.7
pyexcel>=0.1.7