diff options
author | Aurelien Campeas <aurelien.campeas@logilab.fr> | 2008-09-12 11:19:03 +0200 |
---|---|---|
committer | Aurelien Campeas <aurelien.campeas@logilab.fr> | 2008-09-12 11:19:03 +0200 |
commit | 4d768b7e9670a1496f0802ca050cd1e22d672aae (patch) | |
tree | 1d47b2db4fe68dda002fa8af0095d06571981c35 /test | |
parent | 635379d648697d7818f9889268697e9c7077dc16 (diff) | |
download | logilab-common-4d768b7e9670a1496f0802ca050cd1e22d672aae.tar.gz |
remove that, 'till 2.5 is default in debian stable (at least)
Diffstat (limited to 'test')
-rw-r--r-- | test/unittest_context.py | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/test/unittest_context.py b/test/unittest_context.py deleted file mode 100644 index 11fbe98..0000000 --- a/test/unittest_context.py +++ /dev/null @@ -1,38 +0,0 @@ -TEST = """ -from __future__ import with_statement -from os.path import isdir, exists -import shutil -from logilab.common.testlib import TestCase, unittest_main -from logilab.common.context import tempdir - -class ContextTC(TestCase): - - def test_withtempdir(self): - with tempdir() as tmpdir: - assert exists(tmpdir) - assert isdir(tmpdir) - assert not exists(tmpdir) - try: - with tempdir() as tmpdir: - assert exists(tmpdir) - shutil.rmtree(tmpdir) - except OSError: - pass - else: - self.assertTrue(False, "we should fail") - assert not exists(tmpdir) - with tempdir(ignore_error=True) as tmpdir: - shutil.rmtree(tmpdir) - def rmtree_handler(func, path, excinfo): - self.assertTrue(issubclass(excinfo[0], OSError)) - with tempdir(onerror=rmtree_handler) as tmpdir: - shutil.rmtree(tmpdir) -try: - unittest_main() -except SystemExit: - pass -""" - -import sys -if sys.version_info[:2] >= (2, 5): - exec(TEST) |