diff options
author | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2015-01-03 13:18:31 +0200 |
---|---|---|
committer | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2015-01-03 13:18:31 +0200 |
commit | 46f9d7f91212a5b75c7bf400aa56d1b79df30f30 (patch) | |
tree | 1b2a911f8cf50aa371a141a2f03866298ee1946c | |
parent | bb47550521ebf88d04f081334254eb90040f022e (diff) | |
download | astroid-46f9d7f91212a5b75c7bf400aa56d1b79df30f30.tar.gz |
Suppress deprecation messages.
-rw-r--r-- | astroid/tests/unittest_scoped_nodes.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/astroid/tests/unittest_scoped_nodes.py b/astroid/tests/unittest_scoped_nodes.py index a0e5a66..c01adae 100644 --- a/astroid/tests/unittest_scoped_nodes.py +++ b/astroid/tests/unittest_scoped_nodes.py @@ -182,13 +182,15 @@ class ModuleNodeTest(ModuleLoader, unittest.TestCase): def test_file_stream_in_memory(self): data = '''irrelevant_variable is irrelevant''' astroid = test_utils.build_module(data, 'in_memory') - self.assertEqual(astroid.file_stream.read().decode(), data) + with warnings.catch_warnings(record=True): + self.assertEqual(astroid.file_stream.read().decode(), data) def test_file_stream_physical(self): path = resources.find('data/all.py') astroid = builder.AstroidBuilder().file_build(path, 'all') with open(path, 'rb') as file_io: - self.assertEqual(astroid.file_stream.read(), file_io.read()) + with warnings.catch_warnings(record=True): + self.assertEqual(astroid.file_stream.read(), file_io.read()) def test_file_stream_api(self): path = resources.find('data/all.py') |