Skip to content

Commit 2c71b9a

Browse files
committed
TST: remove old tests that just skipped
1 parent 026a122 commit 2c71b9a

File tree

2 files changed

+5
-103
lines changed

2 files changed

+5
-103
lines changed

pandas/io/pytables.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -3509,9 +3509,10 @@ def create_description(self, complib=None, complevel=None,
35093509
fletcher32=False, expectedrows=None):
35103510
""" create the description of the table from the axes & values """
35113511

3512-
# expected rows estimate
3512+
# provided expected rows if its passed
35133513
if expectedrows is None:
35143514
expectedrows = max(self.nrows_expected, 10000)
3515+
35153516
d = dict(name='table', expectedrows=expectedrows)
35163517

35173518
# description from the axes & values

pandas/io/tests/test_pytables.py

+3-102
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import numpy as np
1010

1111
import pandas
12+
import pandas as pd
1213
from pandas import (Series, DataFrame, Panel, MultiIndex, Categorical, bdate_range,
1314
date_range, Index, DatetimeIndex, isnull)
1415

@@ -33,6 +34,7 @@
3334
from pandas import compat
3435
from pandas.compat import range, lrange, u
3536
from pandas.util.testing import assert_produces_warning
37+
from numpy.testing.decorators import slow
3638

3739
try:
3840
import tables
@@ -1497,107 +1499,6 @@ def col(t,column):
14971499
store.put('f2', df)
14981500
self.assertRaises(TypeError, store.create_table_index, 'f2')
14991501

1500-
def test_big_table_frame(self):
1501-
raise nose.SkipTest('no big table frame')
1502-
1503-
# create and write a big table
1504-
df = DataFrame(np.random.randn(2000 * 100, 100), index=range(
1505-
2000 * 100), columns=['E%03d' % i for i in range(100)])
1506-
for x in range(20):
1507-
df['String%03d' % x] = 'string%03d' % x
1508-
1509-
import time
1510-
x = time.time()
1511-
with ensure_clean_store(self.path,mode='w') as store:
1512-
store.append('df', df)
1513-
rows = store.root.df.table.nrows
1514-
recons = store.select('df')
1515-
assert isinstance(recons, DataFrame)
1516-
1517-
com.pprint_thing("\nbig_table frame [%s] -> %5.2f" % (rows, time.time() - x))
1518-
1519-
def test_big_table2_frame(self):
1520-
# this is a really big table: 1m rows x 60 float columns, 20 string, 20 datetime
1521-
# columns
1522-
raise nose.SkipTest('no big table2 frame')
1523-
1524-
# create and write a big table
1525-
com.pprint_thing("\nbig_table2 start")
1526-
import time
1527-
start_time = time.time()
1528-
df = DataFrame(np.random.randn(1000 * 1000, 60), index=range(int(
1529-
1000 * 1000)), columns=['E%03d' % i for i in range(60)])
1530-
for x in range(20):
1531-
df['String%03d' % x] = 'string%03d' % x
1532-
for x in range(20):
1533-
df['datetime%03d' % x] = datetime.datetime(2001, 1, 2, 0, 0)
1534-
1535-
com.pprint_thing("\nbig_table2 frame (creation of df) [rows->%s] -> %5.2f"
1536-
% (len(df.index), time.time() - start_time))
1537-
1538-
def f(chunksize):
1539-
with ensure_clean_store(self.path,mode='w') as store:
1540-
store.append('df', df, chunksize=chunksize)
1541-
r = store.root.df.table.nrows
1542-
return r
1543-
1544-
for c in [10000, 50000, 250000]:
1545-
start_time = time.time()
1546-
com.pprint_thing("big_table2 frame [chunk->%s]" % c)
1547-
rows = f(c)
1548-
com.pprint_thing("big_table2 frame [rows->%s,chunk->%s] -> %5.2f"
1549-
% (rows, c, time.time() - start_time))
1550-
1551-
def test_big_put_frame(self):
1552-
raise nose.SkipTest('no big put frame')
1553-
1554-
com.pprint_thing("\nbig_put start")
1555-
import time
1556-
start_time = time.time()
1557-
df = DataFrame(np.random.randn(1000 * 1000, 60), index=range(int(
1558-
1000 * 1000)), columns=['E%03d' % i for i in range(60)])
1559-
for x in range(20):
1560-
df['String%03d' % x] = 'string%03d' % x
1561-
for x in range(20):
1562-
df['datetime%03d' % x] = datetime.datetime(2001, 1, 2, 0, 0)
1563-
1564-
com.pprint_thing("\nbig_put frame (creation of df) [rows->%s] -> %5.2f"
1565-
% (len(df.index), time.time() - start_time))
1566-
1567-
with ensure_clean_store(self.path, mode='w') as store:
1568-
start_time = time.time()
1569-
store = HDFStore(self.path, mode='w')
1570-
store.put('df', df)
1571-
1572-
com.pprint_thing(df.get_dtype_counts())
1573-
com.pprint_thing("big_put frame [shape->%s] -> %5.2f"
1574-
% (df.shape, time.time() - start_time))
1575-
1576-
def test_big_table_panel(self):
1577-
raise nose.SkipTest('no big table panel')
1578-
1579-
# create and write a big table
1580-
wp = Panel(
1581-
np.random.randn(20, 1000, 1000), items=['Item%03d' % i for i in range(20)],
1582-
major_axis=date_range('1/1/2000', periods=1000), minor_axis=['E%03d' % i for i in range(1000)])
1583-
1584-
wp.ix[:, 100:200, 300:400] = np.nan
1585-
1586-
for x in range(100):
1587-
wp['String%03d'] = 'string%03d' % x
1588-
1589-
import time
1590-
x = time.time()
1591-
1592-
1593-
with ensure_clean_store(self.path, mode='w') as store:
1594-
store.append('wp', wp)
1595-
rows = store.root.wp.table.nrows
1596-
recons = store.select('wp')
1597-
assert isinstance(recons, Panel)
1598-
1599-
com.pprint_thing("\nbig_table panel [%s] -> %5.2f" % (rows, time.time() - x))
1600-
16011502
def test_append_diff_item_order(self):
16021503

16031504
wp = tm.makePanel()
@@ -4436,7 +4337,7 @@ def do_copy(f = None, new_f = None, keys = None, propindexes = True, **kwargs):
44364337
safe_remove(self.path)
44374338

44384339
def test_legacy_table_write(self):
4439-
raise nose.SkipTest("skipping for now")
4340+
raise nose.SkipTest("cannot write legacy tables")
44404341

44414342
store = HDFStore(tm.get_data_path('legacy_hdf/legacy_table_%s.h5' % pandas.__version__), 'a')
44424343

0 commit comments

Comments
 (0)