Skip to content

Commit

Permalink
chore: open coverage result with live-server
Browse files Browse the repository at this point in the history
  • Loading branch information
dotoleeoak committed Feb 27, 2022
1 parent 8b3cb83 commit dd4d5a2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backend/run_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@
ret = os.system(f'coverage run --include="$PWD/*" manage.py test {test_module} --settings={setting}')

if not ret and is_coverage:
os.system("coverage html && open htmlcov/index.html")
os.system('echo "\n----------------------------------------------------------"')
os.system('echo "🌎 Open http://localhost:9000 to check coverage result."')
os.system('echo "✋ Press Ctrl + C to stop serving.\n"')
os.system("coverage html && npx --yes http-server htmlcov -s -p 9000")

0 comments on commit dd4d5a2

Please sign in to comment.