Add new rbext options for specifying app labels and extensions.

Review Request #11428 — Created Feb. 3, 2021 and submitted

chipx86
Review Board
release-4.0.x
reviewboard

rbext historically required a -m parameter to specify modules in the
extension to test, but this wasn't always sufficient. Module names were
just passed to nosetests, and didn't impact the list of installed
apps, meaning that referenced models would fail to import.

To address this, and to simplify usage, there are two new options:

  • -e/--extension takes a full class path, importing it to find the
    list of installed apps, which will be added to Django. This doesn't
    currently support extension dependencies, but it's not clear that
    anyone has ever used this feature anyway.

  • --app can be specified multiple times. It takes an app label that
    gets added to Django.

This massively simplifies the ease of use of rbext, and removes almost
all need for a custom settings_local.py file.

Tested rbext test with the rbintegrations and Power Pack codebases,
utilizing both -e and --app. All tests passed without the need for a
custom settings_local.py.

Summary
Add new rbext options for specifying app labels and extensions.
Description From Last Updated

This reads a little weird, and I think suggesting the long option would be more self-explanatory. Maybe "You may want ...

daviddavid
david
  1. 
      
  2. reviewboard/cmdline/rbext.py (Diff revision 1)
     
     

    This reads a little weird, and I think suggesting the long option would be more self-explanatory. Maybe "You may want to use --extension instead"?

  3. 
      
chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (257a233)
Loading...