diff --git a/testcases/clientreadertestcase.py b/testcases/clientreadertestcase.py index b52ad618..65c3bbc2 100644 --- a/testcases/clientreadertestcase.py +++ b/testcases/clientreadertestcase.py @@ -67,10 +67,12 @@ option = %s os.chmod(f, 0) # fragile test and known to fail e.g. under Cygwin where permissions # seems to be not enforced, thus condition - if not os.access('d.conf', os.R_OK): + if not os.access(f, os.R_OK): self.assertFalse(self.c.read('d')) # should not be readable BUT present else: - raise unittest.SkipTest("Skipping on %s -- access rights are not enforced" % platform) + # SkipTest introduced only in 2.7 thus can't yet use generally + # raise unittest.SkipTest("Skipping on %s -- access rights are not enforced" % platform) + pass def testOptionalDotDDir(self): diff --git a/testcases/filtertestcase.py b/testcases/filtertestcase.py index ecdc7bde..2061327a 100644 --- a/testcases/filtertestcase.py +++ b/testcases/filtertestcase.py @@ -84,9 +84,8 @@ def _assert_equal_entries(utest, found, output, count=None): if len(output) > 3 and count is None: # match matches # do not check if custom count (e.g. going through them twice) if os.linesep != '\n' or sys.platform.startswith('cygwin'): - # on those where text file lines end with '\r\n', override - # repr for this test to disregard trailing CR LF - srepr = lambda x: repr(str(x).rstrip('\n\r')) + # on those where text file lines end with '\r\n', remove '\r' + srepr = lambda x: repr(x).replace(r'\r', '') else: srepr = repr utest.assertEqual(srepr(found[3]), srepr(output[3]))