diff options
author | hut <hut@lavabit.com> | 2010-05-14 17:27:04 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-05-14 17:27:04 +0200 |
commit | 420d3d1af8d2991ae6a8cbe061adaab878c4b3ff (patch) | |
tree | ad1cdc33cc12984c141618439b646424d8a76c25 /test/tc_directory.py | |
parent | 792d6b23711c428a4a2b98537f44e2fbaed97fdd (diff) | |
parent | 2f3326a41430364cb34a227d311691cada605327 (diff) | |
download | ranger-420d3d1af8d2991ae6a8cbe061adaab878c4b3ff.tar.gz |
Merge branch 'master' into cp
Conflicts: ranger/__main__.py
Diffstat (limited to 'test/tc_directory.py')
-rw-r--r-- | test/tc_directory.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/tc_directory.py b/test/tc_directory.py index f1b204c3..024ebc9d 100644 --- a/test/tc_directory.py +++ b/test/tc_directory.py @@ -15,6 +15,7 @@ if __name__ == '__main__': from __init__ import init; init() +import sys from os.path import realpath, join, dirname from ranger import fsobject @@ -38,7 +39,8 @@ class Test1(unittest.TestCase): self.assertFalse(dir.content_loaded) self.assertEqual(dir.filenames, None) self.assertEqual(dir.files, None) - self.assertRaises(fsobject.NotLoadedYet, len, dir) + if not sys.flags.optimize: # asserts are ignored with python -O + self.assertRaises(AssertionError, len, dir) def test_after_content_loaded(self): import os @@ -79,7 +81,8 @@ class Test1(unittest.TestCase): self.assertFalse(dir.exists) self.assertFalse(dir.accessible) self.assertEqual(dir.filenames, None) - self.assertRaises(fsobject.NotLoadedYet, len, dir) + if not sys.flags.optimize: # asserts are ignored with python -O + self.assertRaises(AssertionError, len, dir) def test_load_if_outdated(self): import os |