From: Zooko O'Whielacronx <zooko@zooko.com>
Date: Thu, 15 Jan 2009 01:10:10 +0000 (-0700)
Subject: cli: tests: skip symlink test if there is no os.symlink
X-Git-Tag: allmydata-tahoe-1.3.0~191
X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20/uri/specifications/banana.xhtml?a=commitdiff_plain;h=f9ee60a88e08bef5715e32baeee375526e671c32;p=tahoe-lafs%2Ftahoe-lafs.git

cli: tests: skip symlink test if there is no os.symlink
---

diff --git a/src/allmydata/test/test_cli.py b/src/allmydata/test/test_cli.py
index 5fd09b55..22856866 100644
--- a/src/allmydata/test/test_cli.py
+++ b/src/allmydata/test/test_cli.py
@@ -602,6 +602,8 @@ class Cp(SystemTestMixin, CLITestMixin, unittest.TestCase):
     test_unicode_filename.todo = "This behavior is not yet supported, although it does happen to work (for reasons that are ill-understood) on many platforms.  See issue ticket #534."
 
     def test_dangling_symlink_vs_recursion(self):
+        if not hasattr(os, 'symlink'):
+            raise unittest.SkipTest("There is no symlink on this platform.")
         # cp -r on a directory containing a dangling symlink shouldn't assert
         self.basedir = os.path.dirname(self.mktemp())
         dn = os.path.join(self.basedir, "dir")