Skip to content

Commit

Permalink
remove needless shebangs at top of file from test scripts. add in Pyt…
Browse files Browse the repository at this point in the history
…honGit as pip-package dependency... would be better to do this as a testing dependency specifically but nevermind that for now...
  • Loading branch information
ilaflott committed Sep 24, 2024
1 parent 8af77de commit 4263271
Show file tree
Hide file tree
Showing 17 changed files with 11 additions and 5,293 deletions.
2 changes: 2 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ dependencies:
- conda-forge::pytest-cov
- conda-forge::python-cdo
- conda-forge::cdo>=2.0.0
- pip:
- GitPython
3 changes: 0 additions & 3 deletions fre/tests/test_files/cmip6-cmor-tables/README.md

This file was deleted.

5,274 changes: 0 additions & 5,274 deletions fre/tests/test_files/cmip6-cmor-tables/Tables/CMIP6_Omon.json

This file was deleted.

Binary file not shown.
1 change: 0 additions & 1 deletion fre/tests/test_fre_app_cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
''' test "fre app" calls '''

from click.testing import CliRunner
Expand Down
1 change: 0 additions & 1 deletion fre/tests/test_fre_catalog_cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
''' test "fre catalog" calls '''

from click.testing import CliRunner
Expand Down
1 change: 0 additions & 1 deletion fre/tests/test_fre_check_cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
''' test "fre check" calls '''

from click.testing import CliRunner
Expand Down
1 change: 0 additions & 1 deletion fre/tests/test_fre_cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
''' test "fre" calls '''

from click.testing import CliRunner
Expand Down
10 changes: 5 additions & 5 deletions fre/tests/test_fre_cmor_cli.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
#!/usr/bin/env python3
''' test "fre cmor" calls '''

import datetime
from datetime import date
import pathlib
from pathlib import Path
import subprocess
import netCDF4 as nc

import netCDF4 as nc
from click.testing import CliRunner

from fre import fre
Expand Down Expand Up @@ -46,10 +43,13 @@ def test_cli_fre_cmor_run_opt_dne():
result = runner.invoke(fre.fre, args=["cmor", "run", "optionDNE"])
assert result.exit_code == 2


# maybe this is not the right place for this test case? # TODO
# these unit tests should be more about the cli, rather than the workload
def test_cli_fre_cmor_run_case1(capfd):
''' fre cmor run, test-use case '''


# where are we? we're running pytest from the base directory of this repo
rootdir = 'fre/tests/test_files'

Expand Down
1 change: 0 additions & 1 deletion fre/tests/test_fre_list_cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
''' test "fre list" calls '''

from click.testing import CliRunner
Expand Down
1 change: 0 additions & 1 deletion fre/tests/test_fre_make_cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
''' test "fre make" calls '''

from click.testing import CliRunner
Expand Down
1 change: 0 additions & 1 deletion fre/tests/test_fre_pp_cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
''' test "fre pp" calls '''

from click.testing import CliRunner
Expand Down
1 change: 0 additions & 1 deletion fre/tests/test_fre_run_cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
''' test "fre run" calls '''

from click.testing import CliRunner
Expand Down
1 change: 0 additions & 1 deletion fre/tests/test_fre_test_cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
''' test "fre test" calls '''

from click.testing import CliRunner
Expand Down
1 change: 0 additions & 1 deletion fre/tests/test_fre_yamltools_cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
''' test "fre yamltools" calls '''

from click.testing import CliRunner
Expand Down
2 changes: 2 additions & 0 deletions meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ requirements:
- conda-forge::pytest-cov
- conda-forge::python-cdo
- conda-forge::cdo>=2.0.0
- pip:
- GitPython

test:
source_files:
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
'cylc-flow',
'cylc-rose',
'cdo',
'metomi-rose'
'metomi-rose',
'git'
],
entry_points={
'console_scripts': [
Expand Down

0 comments on commit 4263271

Please sign in to comment.