diff options
author | William Deegan <bill@baddogconsulting.com> | 2016-11-28 18:38:24 +0000 |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2016-11-28 18:38:24 +0000 |
commit | 4305ffd45f7d4070cde7cd1633f01701c7c44128 (patch) | |
tree | d3046061166476c2ab976b11aa87c20cd8e238f9 /test/Fortran/F03FILESUFFIXES.py | |
parent | c1a5840493d5530b2cf9eb27934471c3f8de961e (diff) | |
parent | ee1c39fa6ae3b2f93d3e7c7ca3cfe471f935137d (diff) | |
download | scons-4305ffd45f7d4070cde7cd1633f01701c7c44128.tar.gz |
Merged in williamblevins/scons (pull request #376)
Python3 test fixes for Fortran/Side-effect.
Diffstat (limited to 'test/Fortran/F03FILESUFFIXES.py')
-rw-r--r-- | test/Fortran/F03FILESUFFIXES.py | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/test/Fortran/F03FILESUFFIXES.py b/test/Fortran/F03FILESUFFIXES.py index b1d2b939..9f1a031e 100644 --- a/test/Fortran/F03FILESUFFIXES.py +++ b/test/Fortran/F03FILESUFFIXES.py @@ -24,6 +24,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" +import os import TestSCons _python_ = TestSCons._python_ @@ -32,21 +33,7 @@ _exe = TestSCons._exe test = TestSCons.TestSCons() test.file_fixture('mylink.py') - -test.write('myfortran.py', r""" -import getopt -import sys -comment = '#' + sys.argv[1] -opts, args = getopt.getopt(sys.argv[2:], 'co:') -for opt, arg in opts: - if opt == '-o': out = arg -infile = open(args[0], 'rb') -outfile = open(out, 'wb') -for l in infile.readlines(): - if l[:len(comment)] != comment: - outfile.write(l) -sys.exit(0) -""") +test.file_fixture(os.path.join('fixture', 'myfortran.py')) # Test default file suffix: .f90/.F90 for F90 test.write('SConstruct', """ |