Package: python-apptools / 4.5.0-1.1

skip_test_file_properties Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Description: Skipping a unit test when run as root
 This unit test fails when run as root.  That makes sense because the test
 is checking whether a file will be read-only (which doesn't happen when you
 are root).  Therefore it makes sense to skip this test when running as root
Author: Stewart Ferguson <stew@ferg.aero>
Forwarded: https://github.com/enthought/apptools/pull/88
Last-Update: 2019-02-03
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/apptools/io/tests/file_test_case.py
+++ b/apptools/io/tests/file_test_case.py
@@ -51,7 +51,7 @@ class FileTestCase(unittest.TestCase):
     ###########################################################################
     # Tests.
     ###########################################################################
-
+    @unittest.skipIf(os.getuid() == 0, "Cannot be run as root")
     def test_properties(self):
         """ file properties """