Răsfoiți Sursa

Closes #9434: Enabled django-rich test runner for more user-friendly output

jeremystretch 3 ani în urmă
părinte
comite
87b3be26a0

+ 5 - 1
base_requirements.txt

@@ -30,10 +30,14 @@ django-pglocks
 # https://github.com/korfuri/django-prometheus
 django-prometheus
 
-# Django chaching backend using Redis
+# Django caching backend using Redis
 # https://github.com/jazzband/django-redis
 django-redis
 
+# Django extensions for Rich (terminal text rendering)
+# https://github.com/adamchainz/django-rich
+django-rich
+
 # Django integration for RQ (Reqis queuing)
 # https://github.com/rq/django-rq
 django-rq

+ 1 - 0
docs/release-notes/version-3.3.md

@@ -19,6 +19,7 @@
 ### Other Changes
 
 * [#9261](https://github.com/netbox-community/netbox/issues/9261) - `NetBoxTable` no longer automatically clears pre-existing calls to `prefetch_related()` on its queryset
+* [#9434](https://github.com/netbox-community/netbox/issues/9434) - Enabled `django-rich` test runner for more user-friendly output
 
 ### REST API Changes
 

+ 2 - 0
netbox/netbox/settings.py

@@ -423,6 +423,8 @@ LOGIN_REDIRECT_URL = f'/{BASE_PATH}'
 
 DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
 
+TEST_RUNNER = "django_rich.test.RichRunner"
+
 # Exclude potentially sensitive models from wildcard view exemption. These may still be exempted
 # by specifying the model individually in the EXEMPT_VIEW_PERMISSIONS configuration parameter.
 EXEMPT_EXCLUDE_MODELS = (

+ 1 - 0
requirements.txt

@@ -7,6 +7,7 @@ django-mptt==0.13.4
 django-pglocks==1.0.4
 django-prometheus==2.2.0
 django-redis==5.2.0
+django-rich-1.4.0
 django-rq==2.5.1
 django-tables2==2.4.1
 django-taggit==2.1.0