google-code-export / yabi

Automatically exported from code.google.com/p/yabi
0 stars 1 forks source link

Running tests on quickstart - instructions from fab need changes #204

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run fab quickstart
2. Run fab runtests

You will see:
   raise Exception('No configuration is selected for running tests. Please use select_test_config to select one.')
Exception: No configuration is selected for running tests. Please use 
select_test_config to select one.

But the select_test_config belongs to admin. If the user then runs fab -l they 
will not see that command. Perhaps we could rename the admin level commands to 
match the top level commands.

Also, why do we not have a test_config set to sqlite set already by default?

Original issue reported on code.google.com by amacgregor on 22 May 2012 at 4:40

GoogleCodeExporter commented 9 years ago
Also: if you run fab admin_select_test_config without a config perhaps we could 
print a warning and call list_configs.

Original comment by amacgregor on 22 May 2012 at 4:41

GoogleCodeExporter commented 9 years ago
Further: If I have not run the tests before I get this error:

[localhost] local: python db_utils.py recreatedb
Unlinking yabiadmin_tests.sqlite3
Traceback (most recent call last):
  File "db_utils.py", line 138, in <module>
    main()
  File "db_utils.py", line 135, in main
    getattr(db, arg)() 
  File "db_utils.py", line 35, in recreatedb
    self.dropdb()
  File "db_utils.py", line 45, in dropdb
    os.unlink(self.filename) 
OSError: [Errno 2] No such file or directory: 'yabiadmin_tests.sqlite3'

Original comment by amacgregor on 22 May 2012 at 4:42

GoogleCodeExporter commented 9 years ago
Fixed in 08c8726ff63b on next_release.

1. fab runtests will select sqlite_test by default as test_config if no config 
is selected.
2. fab admin_select_test_config  prints a warning and displays a list of 
available configs if called without a config
3. fab recreatedb won't fail anymore if the sqlite file doesn't exist.

Original comment by szab...@gmail.com on 22 May 2012 at 2:09