From: Daira Hopwood Date: Tue, 22 Sep 2015 15:43:43 +0000 (+0100) Subject: Comment out bad/unfinished test code. X-Git-Url: https://git.rkrishnan.org/provisioning?a=commitdiff_plain;h=f02122a40cb9da360e6b9f58d91b89fbba9693ca;p=tahoe-lafs%2Ftahoe-lafs.git Comment out bad/unfinished test code. Signed-off-by: Daira Hopwood --- diff --git a/src/allmydata/test/test_magic_folder.py b/src/allmydata/test/test_magic_folder.py index afb76d25..319593f5 100644 --- a/src/allmydata/test/test_magic_folder.py +++ b/src/allmydata/test/test_magic_folder.py @@ -160,21 +160,22 @@ class MagicFolderTestMixin(MagicFolderCLITestMixin, ShouldFailMixin, ReallyEqual d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('uploader.directories_created'), 2)) # Files that are moved out of the upload directory should no longer be watched. - def _move_dir_away(ign): - os.rename(new_empty_tree_dir, empty_tree_dir) - # Wuh? Why don't we get this event for the real test? - #self.notify(to_filepath(new_empty_tree_dir), self.inotify.IN_MOVED_FROM) - d.addCallback(_move_dir_away) - def create_file(val): - test_file = abspath_expanduser_unicode(u"what", base=empty_tree_dir) - fileutil.write(test_file, "meow") - return - d.addCallback(create_file) - d.addCallback(lambda ign: time.sleep(1)) - d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('uploader.objects_succeeded'), 4)) - d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('uploader.files_uploaded'), 2)) - d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('uploader.objects_queued'), 0)) - d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('uploader.directories_created'), 2)) + #def _move_dir_away(ign): + # os.rename(new_empty_tree_dir, empty_tree_dir) + # # Wuh? Why don't we get this event for the real test? + # #self.notify(to_filepath(new_empty_tree_dir), self.inotify.IN_MOVED_FROM) + #d.addCallback(_move_dir_away) + #def create_file(val): + # test_file = abspath_expanduser_unicode(u"what", base=empty_tree_dir) + # fileutil.write(test_file, "meow") + # #self.notify(...) + # return + #d.addCallback(create_file) + #d.addCallback(lambda ign: time.sleep(1)) # XXX ICK + #d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('uploader.objects_succeeded'), 4)) + #d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('uploader.files_uploaded'), 2)) + #d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('uploader.objects_queued'), 0)) + #d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('uploader.directories_created'), 2)) d.addBoth(self.cleanup) return d