yhat/db.py — pull request #48 by ueg1990 (2014-11-30 19:28:26+00:00)
Title: Add DemoDB() initialization in setUp()

I added DemoDB() initialization in setUp() for tests and the tests were passing (except for one). But there are two issues/observations:

1) setUp() method is run before every test method. So Refresh schema and Indexing schema happens at every test method. This could be a good thing. But if you think it is inefficient, there may be a way such that the DemoDB initialization happens only once before all the tests are run. If you want that, I can modify it.

2) The test test_table_keys_per_column fails and I get the following error:

======================================================================
ERROR: test_table_keys_per_column (tests.PandaSQLTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/ue/Desktop/Projects/db.py/db/tests/tests.py", line 73, in test_table_keys_per_column
short_db = DemoDB(keys_per_column=1)
TypeError: DemoDB() takes no arguments (1 given)

----------------------------------------------------------------------
Ran 14 tests in 0.127s

FAILED (errors=1)

Did you plan to add default parameter to DemoDB?