From 0b19d02c1bddea73bec8057a6a2bf52199fedc45 Mon Sep 17 00:00:00 2001 From: etobi Date: Sun, 9 Oct 2011 11:23:49 +0200 Subject: Another micro optimization: deferred and cached calculation of attributes within node instances --- tests/test_path_to_node_mapping.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/test_path_to_node_mapping.py') diff --git a/tests/test_path_to_node_mapping.py b/tests/test_path_to_node_mapping.py index 51e7852..917c462 100644 --- a/tests/test_path_to_node_mapping.py +++ b/tests/test_path_to_node_mapping.py @@ -42,15 +42,15 @@ class TestPathToNodeMapping(unittest.TestCase): def test_root(self): node = get_node(self.video, '/') - self.assertEqual('', node.file_system_name) + self.assertEqual('', node.file_system_name()) self.assertEqual(self.video + '/', node.path) def test_subdir(self): node = get_node(self.video, '/folder') - self.assertEqual('folder', node.file_system_name) + self.assertEqual('folder', node.file_system_name()) self.assertEqual(self.video + '/folder', node.path) def test_mpg(self): node = get_node(self.video, '/sample_2008-03-28.20.13.99.99.rec.mpg') - self.assertEqual('sample_2008-03-28.20.13.99.99.rec.mpg', node.file_system_name) + self.assertEqual('sample_2008-03-28.20.13.99.99.rec.mpg', node.file_system_name()) self.assertEqual(self.video + '/sample/2008-03-28.20.13.99.99.rec', node.path) -- cgit v1.2.3