Coverage for heliumcli/actions/update.py: 100.00%

13 statements  

« prev     ^ index     » next       coverage.py v7.3.2, created at 2023-11-22 17:35 +0000

1import subprocess 

2 

3__author__ = "Alex Laird" 

4__copyright__ = "Copyright 2018, Helium Edu" 

5__version__ = "1.5.0" 

6 

7 

8class UpdateAction: 

9 def __init__(self): 

10 self.name = "update" 

11 self.help = "Update the CLI tool to the latest version" 

12 

13 def setup(self, subparsers): 

14 parser = subparsers.add_parser(self.name, help=self.help) 

15 parser.set_defaults(action=self) 

16 

17 def run(self, args): 

18 subprocess.call(["pip", "install", "--upgrade", "heliumcli"])