summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Node
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-04-04 15:30:32 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2017-04-04 15:30:32 (GMT)
commita000057085cfb29d255b9fc9965f113a459be1a2 (patch)
treefdf7a332df3f74125f5f576a377559a41d8f9324 /src/engine/SCons/Node
parent8422f0076020fe92e00aea2ac00c9d0e62f85ab6 (diff)
downloadSCons-a000057085cfb29d255b9fc9965f113a459be1a2.zip
SCons-a000057085cfb29d255b9fc9965f113a459be1a2.tar.gz
SCons-a000057085cfb29d255b9fc9965f113a459be1a2.tar.bz2
py2/3 os.symlink is now defined for win32, but unless user has privs it will always fail. For not skipping symlink tests
Diffstat (limited to 'src/engine/SCons/Node')
-rw-r--r--src/engine/SCons/Node/FSTests.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/engine/SCons/Node/FSTests.py b/src/engine/SCons/Node/FSTests.py
index d168e49..7366b7b 100644
--- a/src/engine/SCons/Node/FSTests.py
+++ b/src/engine/SCons/Node/FSTests.py
@@ -673,7 +673,7 @@ class BaseTestCase(_tempdirTestCase):
nonexistent = fs.Entry('nonexistent')
assert not nonexistent.isfile()
- if hasattr(os, 'symlink'):
+ if sys.platform != 'win32' and hasattr(os, 'symlink'):
def test_islink(self):
"""Test the Base.islink() method"""
test = self.test
@@ -1399,7 +1399,7 @@ class FSTestCase(_tempdirTestCase):
except SyntaxError:
assert c == ""
- if hasattr(os, 'symlink'):
+ if sys.platform != 'win32' and hasattr(os, 'symlink'):
os.symlink('nonexistent', test.workpath('dangling_symlink'))
e = fs.Entry('dangling_symlink')
c = e.get_contents()
@@ -1494,16 +1494,14 @@ class FSTestCase(_tempdirTestCase):
assert r, r
assert not os.path.exists(test.workpath('exists')), "exists was not removed"
- symlink = test.workpath('symlink')
- try:
+ if sys.platform != 'win32' and hasattr(os, 'symlink'):
+ symlink = test.workpath('symlink')
os.symlink(test.workpath('does_not_exist'), symlink)
assert os.path.islink(symlink)
f = fs.File('symlink')
r = f.remove()
assert r, r
assert not os.path.islink(symlink), "symlink was not removed"
- except AttributeError:
- pass
test.write('can_not_remove', "can_not_remove\n")
test.writable(test.workpath('.'), 0)