[Python-checkins] r53483 - python/trunk/Lib/test/test_dumbdbm.py

Neal Norwitz nnorwitz at gmail.com
Thu Jan 18 07:53:13 CET 2007


This test was introduced in r53141 and 53142.  I'm not sure this is
the best fix, but the windows buildbots are passing again (2 out of 3
and I'm assuming #3 will be fine too).

n
--

On 1/17/07, neal.norwitz <python-checkins at python.org> wrote:
> Author: neal.norwitz
> Date: Thu Jan 18 07:20:55 2007
> New Revision: 53483
>
> Modified:
>    python/trunk/Lib/test/test_dumbdbm.py
> Log:
> This test doesn't pass on Windows.  The cause seems to be that chmod
> doesn't support the same funcationality as on Unix.  I'm not sure if
> this fix is the best (or if it will even work)--it's a test to see
> if the buildbots start passing again.
>
> It might be better to not even run this test if it's windows (or non-posix).
>
>
> Modified: python/trunk/Lib/test/test_dumbdbm.py
> ==============================================================================
> --- python/trunk/Lib/test/test_dumbdbm.py       (original)
> +++ python/trunk/Lib/test/test_dumbdbm.py       Thu Jan 18 07:20:55 2007
> @@ -50,11 +50,17 @@
>          finally:
>              os.umask(old_umask)
>
> +        expected_mode = 0635
> +        if os.name != 'posix':
> +            # Windows only supports setting the read-only attribute.
> +            # This shouldn't fail, but doesn't work like Unix either.
> +            expected_mode = 0666
> +
>          import stat
>          st = os.stat(_fname + '.dat')
> -        self.assertEqual(stat.S_IMODE(st.st_mode), 0635)
> +        self.assertEqual(stat.S_IMODE(st.st_mode), expected_mode)
>          st = os.stat(_fname + '.dir')
> -        self.assertEqual(stat.S_IMODE(st.st_mode), 0635)
> +        self.assertEqual(stat.S_IMODE(st.st_mode), expected_mode)
>
>      def test_close_twice(self):
>          f = dumbdbm.open(_fname)
> _______________________________________________
> Python-checkins mailing list
> Python-checkins at python.org
> http://mail.python.org/mailman/listinfo/python-checkins
>


More information about the Python-checkins mailing list