| Total Complexity | 2 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | #!/usr/bin/env python |
||
| 2 | # -*- coding: utf-8 -*- |
||
| 3 | # Apache Software License 2.0 |
||
| 4 | # |
||
| 5 | # Copyright (c) 2018, Christophe Duong |
||
| 6 | # |
||
| 7 | # Licensed under the Apache License, Version 2.0 (the "License"); |
||
| 8 | # you may not use this file except in compliance with the License. |
||
| 9 | # You may obtain a copy of the License at |
||
| 10 | # |
||
| 11 | # http://www.apache.org/licenses/LICENSE-2.0 |
||
| 12 | # |
||
| 13 | # Unless required by applicable law or agreed to in writing, software |
||
| 14 | # distributed under the License is distributed on an "AS IS" BASIS, |
||
| 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||
| 16 | # See the License for the specific language governing permissions and |
||
| 17 | # limitations under the License. |
||
| 18 | """Tests for `aiscalator` package.""" |
||
| 19 | |||
| 20 | from click.testing import CliRunner |
||
| 21 | |||
| 22 | from aiscalator import cli |
||
| 23 | |||
| 24 | |||
| 25 | def test_cli_jupyter(): |
||
| 26 | """Test the CLI on Jupyter sub-commands.""" |
||
| 27 | runner = CliRunner() |
||
| 28 | print() |
||
| 29 | with runner.isolated_filesystem(): |
||
| 30 | # test = ['jupyter', "new", "test", "--name", "test_name"] |
||
| 31 | test = ['jupyter'] |
||
| 32 | msg = "Testing CLI with: " + " ".join(test) + " => " |
||
| 33 | print(msg) |
||
| 34 | result = runner.invoke(cli.main, test) |
||
| 35 | |||
| 36 | assert result.exit_code == 0 |
||
| 37 |