2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-13 18:45:40 +00:00

Seperate CUI url paths and tests (#6543)

* move CUI JS files to CUI url section

* add flag to seperate CUI code and tests

* re-enable tests

* move urls back to backend patterns

* swap switch logic

* fix merge

* returning PUI paths if CUI not enabled

* revert test changes

* fix plugin settings url

* URL is not dependant on UI generation

* small fixes

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
Matthias Mair
2024-02-22 22:56:50 +00:00
committed by GitHub
parent f5e02fd292
commit 6f0b2b31a8
28 changed files with 156 additions and 34 deletions

View File

@ -804,10 +804,17 @@ def test_translations(c):
'migrations': 'Run migration unit tests',
'report': 'Display a report of slow tests',
'coverage': 'Run code coverage analysis (requires coverage package)',
'cui': 'Do not run CUI tests',
}
)
def test(
c, disable_pty=False, runtest='', migrations=False, report=False, coverage=False
c,
disable_pty=False,
runtest='',
migrations=False,
report=False,
coverage=False,
cui=False,
):
"""Run unit-tests for InvenTree codebase.
@ -843,6 +850,9 @@ def test(
else:
cmd += ' --exclude-tag migration_test'
if cui:
cmd += ' --exclude-tag=cui'
if coverage:
# Run tests within coverage environment, and generate report
c.run(f'coverage run {managePyPath()} {cmd}')