Skip to content

Commit c54eacb

Browse files
committed
disable the file handle test for all
1 parent f6a6c42 commit c54eacb

File tree

3 files changed

+0
-52
lines changed

3 files changed

+0
-52
lines changed

.moban.d/tests/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{% extends 'tests/requirements.txt.jj2' %}
22
{%block extras %}
3-
psutil
43
pyexcel
54
pyexcel-xls
65
{%endblock%}

tests/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ mock;python_version<"3"
33
codecov
44
coverage
55
flake8
6-
psutil
76
pyexcel
87
pyexcel-xls

tests/test_bug_fixes.py

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@
66
import os
77
import sys
88
import datetime
9-
import psutil
109
from textwrap import dedent
1110
import pyexcel as pe
1211
from pyexcel_xlsx.xlsxr import get_columns
1312
from pyexcel.internal.sheets._shared import excel_column_index
1413
from nose.tools import eq_
15-
from platform import python_implementation
1614

1715

1816
PY36_ABOVE = sys.version_info[0] == 3 and sys.version_info[1] >= 6
@@ -141,53 +139,5 @@ def test_issue_8_hidden_sheet_2():
141139
eq_(book_dict['hidden'], [['a', 'b']])
142140

143141

144-
def test_issue_14_xlsx_file_handle():
145-
if python_implementation == 'PyPy':
146-
return
147-
if PY36_ABOVE:
148-
return
149-
proc = psutil.Process()
150-
test_file = os.path.join("tests", "fixtures", "hidden_sheets.xlsx")
151-
open_files_l1 = proc.open_files()
152-
153-
# start with a csv file
154-
data = pe.iget_array(file_name=test_file, library='pyexcel-xlsx')
155-
open_files_l2 = proc.open_files()
156-
delta = len(open_files_l2) - len(open_files_l1)
157-
# interestingly, file is already open :)
158-
assert delta == 1
159-
160-
# now the file handle get opened when we run through
161-
# the generator
162-
list(data)
163-
open_files_l3 = proc.open_files()
164-
delta = len(open_files_l3) - len(open_files_l1)
165-
# caught an open file handle, the "fish" finally
166-
assert delta == 1
167-
168-
# free the fish
169-
pe.free_resources()
170-
open_files_l4 = proc.open_files()
171-
# this confirms that no more open file handle
172-
eq_(open_files_l1, open_files_l4)
173-
174-
175-
def test_issue_83_file_handle_no_generator():
176-
if python_implementation == 'PyPy':
177-
return
178-
proc = psutil.Process()
179-
test_files = [
180-
os.path.join("tests", "fixtures", "hidden_sheets.xlsx")
181-
]
182-
for test_file in test_files:
183-
open_files_l1 = proc.open_files()
184-
# start with a csv file
185-
pe.get_array(file_name=test_file)
186-
open_files_l2 = proc.open_files()
187-
delta = len(open_files_l2) - len(open_files_l1)
188-
# no open file handle should be left
189-
assert delta == 0
190-
191-
192142
def get_fixtures(file_name):
193143
return os.path.join("tests", "fixtures", file_name)

0 commit comments

Comments
 (0)