Skip to content

Commit

Permalink
did small cleanup and added 2 test cases from GitHub issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mbdevpl committed Dec 10, 2017
1 parent 0eb17f0 commit e69379b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
3 changes: 2 additions & 1 deletion open_fortran_parser/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ def main(args=None, namespace=None):
return

if args.cleanup_dependencies:
cleanup_old_dependencies(OUTDATED_DEPENDENCIES, DEPENDENCIES_PATH)
cleanup_old_dependencies(OUTDATED_DEPENDENCIES, DEV_DEPENDENCIES_PATH)
return

if not args.input:
parser.print_help(sys.stderr)
Expand Down
7 changes: 7 additions & 0 deletions test/examples/problematic_write.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

PROGRAM problematic_if

! IF (printlev_loc >=2) WRITE(numout,*),'tau_outflow, coeff_rel = ', tau_outflow, coeff_rel
IF (printlev_loc >=2) WRITE(numout,*) 'tau_outflow, coeff_rel = ', tau_outflow, coeff_rel

END
8 changes: 8 additions & 0 deletions test/examples/simple_if.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

PROGRAM simple_if

IF (map_pft_format .AND. .NOT. impveg) THEN
CONTINUE
ENDIF

END
2 changes: 1 addition & 1 deletion test/test_parser_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def test_generate_xml(self):
with self.subTest(input_path=input_path, verbosity=verbosity):
output_path = pathlib.Path(results_path, input_path.name + '.xml')
process = execute_parser(input_path, output_path, verbosity)
self.assertEqual(process.returncode, 0)
self.assertEqual(process.returncode, 0, process)
self.assertTrue(output_path.exists())

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

0 comments on commit e69379b

Please sign in to comment.