1
0
Fork 0

Add test plan and place holder stubs.

This commit is contained in:
Amjith Ramanujam 2014-12-09 23:14:49 -08:00
parent 393fb49c92
commit e3f7d263f3
8 changed files with 67 additions and 21 deletions

44
TODO
View File

@ -1,32 +1,34 @@
* [] Check why Indexes have a invalid at the end when \d is called on them.
* [] Add some tests. Sanity, Unit, Completion, Config.
* [ ] Add tests for smart completion.
* [] Check how to add the name of the table before printing the table.
* [] Show only table sensitive columns in autocompletion.
* [] Add a toolbar at the bottom with some helpful keyboard shortcuts.
* [] Add logging.
* [] Setup the pgcli.com website.
* [ ] Add a new trigger for M-/ that does dumb completion.
* [] Add function keys that can enable/disable smart completion.
* [] Improve the smart completion for Insert statement.
* [] Improve the smart completion for Update statement.
* [ ] Find a way to add documentation to sql commands. This could get tricky.
* [ ] Detect a '.' and parse the word before it and get it's real name.
* [] Refactor the execution and output into a separate class.
* [] Create a class for the config and make it easy to access.
* [O] Add MySQL commands (use, describe etc)
* [X] Add more complex slash commands such as \d <table_name>.
* This is going to take a separate lib.
* [X] Create a better framework for adding special commands.
* A dict with special commands as keys.
* The value can either be a string or a callable.
* [X] Fix the \d <tablename>. Seems broken.
* [X] Check what happens when \d django* is run.
* [] \c is broken.
* [] Check why Indexes have a invalid at the end when \d is called on them.
* [X] \c is broken.
* [X] Vendor in tabulate.
* [X] Create a separate pgspecial package.
* [X] Vendor in pgspecial package.
* [X] Auto-refresh for \c and 'use' statements.
* [X] Add \c command.
* [O] Add MySQL commands (use, describe etc)
* [X] Add exit, quit and \q.
* [] Show only table sensitive columns.
* [] Add logging.
* [] Add some tests. Sanity, Unit, Completion, Config.
* [] Setup the pgcli.com website.
* [ ] Add a new trigger for M-/ that does dumb completion.
* [] Improve the smart completion for Insert statement.
* [] Improve the smart completion for Update statement.
* [ ] Find a way to add documentation to sql commands. This could get tricky.
* [ ] Add tests for smart completion.
* [ ] Detect a '.' and parse the word before it and get it's real name.
* [] Refactor the execution and output into a separate class.
* [] Create a class for the config and make it easy to access.
* [ ] Add more complex slash commands such as \d <table_name>.
* This is going to take a separate lib.
* [] Send the last token as a PR back to sqlparse.
* [] Create a better framework for adding special commands.
* A dict with special commands as keys.
* The value can either be a string or a callable.
* [X] Get new table style merged back to tabulate.
* [X] Add multi-line support.
* [X] Refresh tables and columns after a create table and alter table.

View File

View File

0
tests/test_pgexecute.py Normal file
View File

0
tests/test_pgspecial.py Normal file
View File

38
tests/test_plan.wiki Normal file
View File

@ -0,0 +1,38 @@
= Gross Checks =
* [ ] Check connecting to a local database.
* [ ] Check connecting to a remote database.
* [ ] Check connecting to a database with a user/password.
* [ ] Check connecting to a non-existent database.
* [ ] Test changing the database.
== PGExecute ==
* [ ] Test successful execution given a cursor.
* [ ] Test unsuccessful execution with a syntax error.
* [ ] Test a series of executions with the same cursor without failure.
* [ ] Test a series of executions with the same cursor with failure.
* [ ] Test passing in a special command.
== Naive Autocompletion ==
* [ ] Input empty string, ask for completions - Everything.
* [ ] Input partial prefix, ask for completions - Stars with prefix.
* [ ] Input fully autocompleted string, ask for completions - Only full match
* [ ] Input non-existent prefix, ask for completions - nothing
* [ ] Input lowercase prefix - case insensitive completions
== Smart Autocompletion ==
* [ ] Input empty string and check if only keywords are returned.
* [ ] Input SELECT prefix and check if only columns and '*' are returned.
* [ ] Input SELECT blah - only keywords are returned.
* [ ] Input SELECT * FROM - Table names only
== PGSpecial ==
* [ ] Test \d
* [ ] Test \d tablename
* [ ] Test \d tablena*
* [ ] Test \d non-existent-tablename
* [ ] Test \d index
* [ ] Test \d sequence
* [ ] Test \d view
== Exceptionals ==
* [ ] Test the 'use' command to change db.

View File

6
tests/tox.ini Normal file
View File

@ -0,0 +1,6 @@
[tox]
envlist = py26, py27, py33, py34
[testenv]
deps = pytest
commands = py.test