Skip to content

Commit e69379b

Browse files
committed
did small cleanup and added 2 test cases from GitHub issues
1 parent 0eb17f0 commit e69379b

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

open_fortran_parser/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ def main(args=None, namespace=None):
5656
return
5757

5858
if args.cleanup_dependencies:
59-
cleanup_old_dependencies(OUTDATED_DEPENDENCIES, DEPENDENCIES_PATH)
59+
cleanup_old_dependencies(OUTDATED_DEPENDENCIES, DEV_DEPENDENCIES_PATH)
60+
return
6061

6162
if not args.input:
6263
parser.print_help(sys.stderr)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
PROGRAM problematic_if
3+
4+
! IF (printlev_loc >=2) WRITE(numout,*),'tau_outflow, coeff_rel = ', tau_outflow, coeff_rel
5+
IF (printlev_loc >=2) WRITE(numout,*) 'tau_outflow, coeff_rel = ', tau_outflow, coeff_rel
6+
7+
END

test/examples/simple_if.f90

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
PROGRAM simple_if
3+
4+
IF (map_pft_format .AND. .NOT. impveg) THEN
5+
CONTINUE
6+
ENDIF
7+
8+
END

test/test_parser_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def test_generate_xml(self):
8888
with self.subTest(input_path=input_path, verbosity=verbosity):
8989
output_path = pathlib.Path(results_path, input_path.name + '.xml')
9090
process = execute_parser(input_path, output_path, verbosity)
91-
self.assertEqual(process.returncode, 0)
91+
self.assertEqual(process.returncode, 0, process)
9292
self.assertTrue(output_path.exists())
9393

9494
@unittest.skipUnless(os.environ.get('TEST_LONG'), 'skipping long test')

0 commit comments

Comments
 (0)