diff options
author | edA-qa mort-ora-y <edA-qa@disemia.com> | 2012-05-06 09:11:11 +0200 |
---|---|---|
committer | edA-qa mort-ora-y <edA-qa@disemia.com> | 2012-05-06 09:11:11 +0200 |
commit | a10c5b8cfeae168eb39cf92c59166501c2bd4c96 (patch) | |
tree | 2406d6521e8bb04188b0efa79d860b291c1f6dae /test/issue2821.py | |
parent | 4ed4c0db27ab349cce3f0f6653bd6c2e61064734 (diff) | |
download | scons-a10c5b8cfeae168eb39cf92c59166501c2bd4c96.tar.gz |
better fix for issue 2821 -- avoid direct copies of the BuilderDict as it is ambiguous/corrupts the original environment
Diffstat (limited to 'test/issue2821.py')
-rw-r--r-- | test/issue2821.py | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/test/issue2821.py b/test/issue2821.py new file mode 100644 index 00000000..b6cda716 --- /dev/null +++ b/test/issue2821.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# + +__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +import TestSCons + +test = TestSCons.TestSCons() + +test.write('SConstruct', """ +test = Environment() +def blub(): + pass + +test.Library.__call__ = blub +test.Clone() +assert test.Library.__call__ == blub +""") + +test.run() + +test.pass_test() + + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: |