Skip to content

Commit 24fa35d

Browse files
committed
Merge pull request #5 from fuhrysteve/master
Fix unit tests, thanks and credit go to @fuhrysteve
2 parents fc3e2e9 + f7cb6b0 commit 24fa35d

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-5
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
.coverage
44
pyexcel*-info
55
build
6-
dist
6+
dist
7+
tmp.db

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,11 @@ python:
99
- 2.7
1010
- 3.3
1111
- 3.4
12+
- 3.5
1213
- pypy
1314
install:
1415
- if [[ $TRAVIS_PYTHON_VERSION == "2.6" ]]; then pip install ordereddict; fi
1516
- python setup.py install
16-
- pip install git+https://github.com/chfw/pyexcel-xls.git
17-
- pip install git+https://github.com/chfw/pyexcel.git
1817
- pip install -r tests/requirements.txt
1918
script:
2019
make test

pyexcel_io/csvbook.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def close(self):
237237
"""
238238
This call close the file handle
239239
"""
240-
if not (isinstance(self.f, StringIO) and isinstance(self.f, BytesIO)):
240+
if not (isinstance(self.f, StringIO) or isinstance(self.f, BytesIO)):
241241
self.f.close()
242242
elif not self.single_sheet_in_book:
243243
self.f.write("---pyexcel---\r\n")

setup.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
if sys.version_info[0] == 2 and sys.version_info[1] < 7:
1515
dependencies.append('ordereddict')
1616

17+
extras = {
18+
'xls': ['pyexcel-xls>=0.0.7'],
19+
'xlsx': ['pyexcel-xlsx>=0.0.7'],
20+
}
21+
1722
setup(
1823
name='pyexcel-io',
1924
author="C. W.",
@@ -22,6 +27,7 @@
2227
url="https://github.com/chfw/pyexcel-io",
2328
description='A python library to read and write structured data in csv, zipped csv format and to/from databases',
2429
install_requires=dependencies,
30+
extras_require=extras,
2531
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
2632
include_package_data=True,
2733
long_description=README_txt,

tests/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ nose-cov
44
python-coveralls
55
coverage
66
SQLAlchemy
7-
pyexcel-xls
7+
pyexcel-xls>=0.0.7
8+
pyexcel>=0.1.7

0 commit comments

Comments
 (0)