Skip to content

Commit

Permalink
pylint edits
Browse files Browse the repository at this point in the history
  • Loading branch information
ilaflott committed Aug 9, 2024
1 parent 6ce2032 commit 306c14f
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 85 deletions.
12 changes: 5 additions & 7 deletions fre/tests/test_fre_app_cli.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
#!/usr/bin/env python3

# tests are structured in the manner of:
# https://click.palletsprojects.com/en/8.1.x/testing/
# general intent is to test the cli of each (sub)tool
# command, help, command does not exist
''' test "fre app" calls '''

from click.testing import CliRunner
runner = CliRunner()

from fre import fre

# tests for base 'fre app' calls
runner = CliRunner()

def test_cli_fre_app():
''' fre app '''
result = runner.invoke(fre.fre, args=["app"])
assert result.exit_code == 0

def test_cli_fre_app_help():
''' fre app --help '''
result = runner.invoke(fre.fre, args=["app", "--help"])
assert result.exit_code == 0

def test_cli_fre_app_opt_dne():
''' fre app optionDNE '''
result = runner.invoke(fre.fre, args=["app", "optionDNE"])
assert result.exit_code == 2
22 changes: 11 additions & 11 deletions fre/tests/test_fre_catalog_cli.py
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
#!/usr/bin/env python3

# tests are structured in the manner of:
# https://click.palletsprojects.com/en/8.1.x/testing/
# general intent is to test the cli of each (sub)tool
# command, help, command does not exist
''' test "fre catalog" calls '''

from click.testing import CliRunner
runner = CliRunner()

from fre import fre

# tests for base 'fre catalog' calls
runner = CliRunner()

def test_cli_fre_catalog():
''' fre catalog '''
result = runner.invoke(fre.fre, args=["catalog"])
assert result.exit_code == 0

def test_cli_fre_catalog_help():
''' fre catalog --help '''
result = runner.invoke(fre.fre, args=["catalog", "--help"])
assert result.exit_code == 0

def test_cli_fre_catalog_opt_dne():
''' fre catalog optionDNE '''
result = runner.invoke(fre.fre, args=["catalog", "optionDNE"])
assert result.exit_code == 2

def test_cli_fre_catalog_builder():
result = runner.invoke(fre.fre, args=["catalog", "builder", "--help"])
assert result.exit_code == 0

def test_cli_fre_catalog_builder():
''' fre catalog builder '''
result = runner.invoke(fre.fre, args=["catalog", "builder"])
assert all( [
result.exit_code == 1,
'No paths given, using yaml configuration'
in result.stdout.split('\n')
]
)

def test_cli_fre_catalog_builder_help():
''' fre catalog builder --help '''
result = runner.invoke(fre.fre, args=["catalog", "builder", "--help"])
assert result.exit_code == 0
12 changes: 5 additions & 7 deletions fre/tests/test_fre_check_cli.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
#!/usr/bin/env python3

# tests are structured in the manner of:
# https://click.palletsprojects.com/en/8.1.x/testing/
# general intent is to test the cli of each (sub)tool
# command, help, command does not exist
''' test "fre check" calls '''

from click.testing import CliRunner
runner = CliRunner()

from fre import fre

# tests for base 'fre check' calls
runner = CliRunner()

def test_cli_fre_check():
''' fre check '''
result = runner.invoke(fre.fre, args=["check"])
assert result.exit_code == 0

def test_cli_fre_check_help():
''' fre check --help '''
result = runner.invoke(fre.fre, args=["check", "--help"])
assert result.exit_code == 0

def test_cli_fre_check_opt_dne():
''' fre check optionDNE '''
result = runner.invoke(fre.fre, args=["check", "optionDNE"])
assert result.exit_code == 2
16 changes: 5 additions & 11 deletions fre/tests/test_fre_cli.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,23 @@
#!/usr/bin/env python3

# tests are structured in the manner of:
# https://click.palletsprojects.com/en/8.1.x/testing/
# general intent is to test the cli of each (sub)tool
# command, help, command does not exist
''' test "fre" calls '''

from click.testing import CliRunner
runner = CliRunner()

from fre import fre

# tests for base 'fre' calls
runner = CliRunner()

def test_cli_fre():
''' fre '''
result = runner.invoke(fre.fre)
assert result.exit_code == 0

def test_cli_fre_help():
''' fre --help '''
result = runner.invoke(fre.fre, args='--help')
assert result.exit_code == 0

def test_cli_fre_option_dne():
''' fre optionDNE '''
result = runner.invoke(fre.fre, args='optionDNE')
assert result.exit_code == 2




12 changes: 5 additions & 7 deletions fre/tests/test_fre_cmor_cli.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
#!/usr/bin/env python3

# tests are structured in the manner of:
# https://click.palletsprojects.com/en/8.1.x/testing/
# general intent is to test the cli of each (sub)tool
# command, help, command does not exist
''' test "fre cmor" calls '''

from click.testing import CliRunner
runner = CliRunner()

from fre import fre

# tests for base 'fre cmor' calls
runner = CliRunner()

def test_cli_fre_cmor():
''' fre cmor '''
result = runner.invoke(fre.fre, args=["cmor"])
assert result.exit_code == 0

def test_cli_fre_cmor_help():
''' fre cmor --help '''
result = runner.invoke(fre.fre, args=["cmor", "--help"])
assert result.exit_code == 0

def test_cli_fre_cmor_opt_dne():
''' fre cmor optionDNE '''
result = runner.invoke(fre.fre, args=["cmor", "optionDNE"])
assert result.exit_code == 2
12 changes: 5 additions & 7 deletions fre/tests/test_fre_list_cli.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
#!/usr/bin/env python3

# tests are structured in the manner of:
# https://click.palletsprojects.com/en/8.1.x/testing/
# general intent is to test the cli of each (sub)tool
# command, help, command does not exist
''' test "fre list" calls '''

from click.testing import CliRunner
runner = CliRunner()

from fre import fre

# tests for base 'fre list' calls
runner = CliRunner()

def test_cli_fre_list():
''' fre list '''
result = runner.invoke(fre.fre, args=["list"])
assert result.exit_code == 0

def test_cli_fre_list_help():
''' fre list --help '''
result = runner.invoke(fre.fre, args=["list", "--help"])
assert result.exit_code == 0

def test_cli_fre_list_opt_dne():
''' fre list optionDNE '''
result = runner.invoke(fre.fre, args=["list", "optionDNE"])
assert result.exit_code == 2
12 changes: 5 additions & 7 deletions fre/tests/test_fre_make_cli.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
#!/usr/bin/env python3

# tests are structured in the manner of:
# https://click.palletsprojects.com/en/8.1.x/testing/
# general intent is to test the cli of each (sub)tool
# command, help, command does not exist
''' test "fre make" calls '''

from click.testing import CliRunner
runner = CliRunner()

from fre import fre

# tests for base 'fre make' calls
runner = CliRunner()

def test_cli_fre_make():
''' fre make '''
result = runner.invoke(fre.fre, args=["make"])
assert result.exit_code == 0

def test_cli_fre_make_help():
''' fre make --help '''
result = runner.invoke(fre.fre, args=["make", "--help"])
assert result.exit_code == 0

def test_cli_fre_make_opt_dne():
''' fre make optionDNE '''
result = runner.invoke(fre.fre, args=["make", "optionDNE"])
assert result.exit_code == 2
12 changes: 5 additions & 7 deletions fre/tests/test_fre_pp_cli.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
#!/usr/bin/env python3

# tests are structured in the manner of:
# https://click.palletsprojects.com/en/8.1.x/testing/
# general intent is to test the cli of each (sub)tool
# command, help, command does not exist
''' test "fre pp" calls '''

from click.testing import CliRunner
runner = CliRunner()

from fre import fre

# tests for base 'fre pp' calls
runner = CliRunner()

def test_cli_fre_pp():
''' fre pp '''
result = runner.invoke(fre.fre, args=["pp"])
assert result.exit_code == 0

def test_cli_fre_pp_help():
''' fre pp --help '''
result = runner.invoke(fre.fre, args=["pp", "--help"])
assert result.exit_code == 0

def test_cli_fre_pp_opt_dne():
''' fre pp optionDNE '''
result = runner.invoke(fre.fre, args=["pp", "optionDNE"])
assert result.exit_code == 2
12 changes: 5 additions & 7 deletions fre/tests/test_fre_run_cli.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
#!/usr/bin/env python3

# tests are structured in the manner of:
# https://click.palletsprojects.com/en/8.1.x/testing/
# general intent is to test the cli of each (sub)tool
# command, help, command does not exist
''' test "fre run" calls '''

from click.testing import CliRunner
runner = CliRunner()

from fre import fre

# tests for base 'fre run' calls
runner = CliRunner()

def test_cli_fre_run():
''' fre run '''
result = runner.invoke(fre.fre, args=["run"])
assert result.exit_code == 0

def test_cli_fre_run_help():
''' fre run --help '''
result = runner.invoke(fre.fre, args=["run", "--help"])
assert result.exit_code == 0

def test_cli_fre_run_opt_dne():
''' fre run optionDNE '''
result = runner.invoke(fre.fre, args=["run", "optionDNE"])
assert result.exit_code == 2
12 changes: 5 additions & 7 deletions fre/tests/test_fre_test_cli.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
#!/usr/bin/env python3

# tests are structured in the manner of:
# https://click.palletsprojects.com/en/8.1.x/testing/
# general intent is to test the cli of each (sub)tool
# command, help, command does not exist
''' test "fre test" calls '''

from click.testing import CliRunner
runner = CliRunner()

from fre import fre

# tests for base 'fre test' calls
runner = CliRunner()

def test_cli_fre_test():
''' fre test '''
result = runner.invoke(fre.fre, args=["test"])
assert result.exit_code == 0

def test_cli_fre_test_help():
''' fre test --help '''
result = runner.invoke(fre.fre, args=["test", "--help"])
assert result.exit_code == 0

def test_cli_fre_test_opt_dne():
''' fre test optionDNE '''
result = runner.invoke(fre.fre, args=["test", "optionDNE"])
assert result.exit_code == 2
12 changes: 5 additions & 7 deletions fre/tests/test_fre_yamltools_cli.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
#!/usr/bin/env python3

# tests are structured in the manner of:
# https://click.palletsprojects.com/en/8.1.x/testing/
# general intent is to test the cli of each (sub)tool
# command, help, command does not exist
''' test "fre yamltools" calls '''

from click.testing import CliRunner
runner = CliRunner()

from fre import fre

# tests for base 'fre yamltools' calls
runner = CliRunner()

def test_cli_fre_yamltools():
''' fre yamltools '''
result = runner.invoke(fre.fre, args=["yamltools"])
assert result.exit_code == 0

def test_cli_fre_yamltools_help():
''' fre yamltools --help '''
result = runner.invoke(fre.fre, args=["yamltools", "--help"])
assert result.exit_code == 0

def test_cli_fre_yamltools_opt_dne():
''' fre yamltools optionDNE '''
result = runner.invoke(fre.fre, args=["yamltools", "optionDNE"])
assert result.exit_code == 2

0 comments on commit 306c14f

Please sign in to comment.