diff options
author | William Deegan <bill@baddogconsulting.com> | 2016-11-28 18:38:24 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2016-11-28 18:38:24 (GMT) |
commit | daab400692d467faf2af7ac035cc00a15711ce82 (patch) | |
tree | d3046061166476c2ab976b11aa87c20cd8e238f9 /test/Fortran/SHF08.py | |
parent | a3aa375f59535bfbe0aecdaabdeb40bc419125e1 (diff) | |
parent | 2a13b4ee309325261f69cbcb7bb69a78ef27a08a (diff) | |
download | SCons-daab400692d467faf2af7ac035cc00a15711ce82.zip SCons-daab400692d467faf2af7ac035cc00a15711ce82.tar.gz SCons-daab400692d467faf2af7ac035cc00a15711ce82.tar.bz2 |
Merged in williamblevins/scons (pull request #376)
Python3 test fixes for Fortran/Side-effect.
Diffstat (limited to 'test/Fortran/SHF08.py')
-rw-r--r-- | test/Fortran/SHF08.py | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/test/Fortran/SHF08.py b/test/Fortran/SHF08.py index 0aed858..10f9314 100644 --- a/test/Fortran/SHF08.py +++ b/test/Fortran/SHF08.py @@ -24,6 +24,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" +import os import TestSCons _python_ = TestSCons._python_ @@ -32,24 +33,7 @@ obj_ = TestSCons.shobj_ test = TestSCons.TestSCons() - - -test.write('myfortran.py', r""" -import getopt -import sys -comment = '#' + sys.argv[1] -opts, args = getopt.getopt(sys.argv[2:], 'cf:o:K:') -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.write('SConstruct', """ env = Environment(SHF08 = r'%(_python_)s myfortran.py g08', |