Beispiel #1
0
 def test_inotify(self, pyinotify):
     kq = getattr(select, "kqueue", None)
     delattr(select, "kqueue")
     platform, sys.platform = sys.platform, "linux"
     try:
         self.assertEqual(default_implementation(), "inotify")
         ino, autoreload.pyinotify = autoreload.pyinotify, None
         try:
             self.assertEqual(default_implementation(), "stat")
         finally:
             autoreload.pyinotify = ino
     finally:
         if kq:
             select.kqueue = kq
         sys.platform = platform
 def test_inotify(self, pyinotify):
     kq = getattr(select, 'kqueue', None)
     try:
         delattr(select, 'kqueue')
     except AttributeError:
         pass
     platform, sys.platform = sys.platform, 'linux'
     try:
         self.assertEqual(default_implementation(), 'inotify')
         ino, autoreload.pyinotify = autoreload.pyinotify, None
         try:
             self.assertEqual(default_implementation(), 'stat')
         finally:
             autoreload.pyinotify = ino
     finally:
         if kq:
             select.kqueue = kq
         sys.platform = platform
Beispiel #3
0
 def test_inotify(self, pyinotify):
     kq = getattr(select, 'kqueue', None)
     try:
         delattr(select, 'kqueue')
     except AttributeError:
         pass
     platform, sys.platform = sys.platform, 'linux'
     try:
         self.assertEqual(default_implementation(), 'inotify')
         ino, autoreload.pyinotify = autoreload.pyinotify, None
         try:
             self.assertEqual(default_implementation(), 'stat')
         finally:
             autoreload.pyinotify = ino
     finally:
         if kq:
             select.kqueue = kq
         sys.platform = platform
Beispiel #4
0
 def test_inotify(self, pyinotify):
     kq = getattr(select, "kqueue", None)
     try:
         delattr(select, "kqueue")
     except AttributeError:
         pass
     platform, sys.platform = sys.platform, "linux"
     try:
         self.assertEqual(default_implementation(), "inotify")
         ino, autoreload.pyinotify = autoreload.pyinotify, None
         try:
             self.assertEqual(default_implementation(), "stat")
         finally:
             autoreload.pyinotify = ino
     finally:
         if kq:
             select.kqueue = kq
         sys.platform = platform
 def test_kqueue(self, kqueue):
     self.assertEqual(default_implementation(), 'kqueue')
Beispiel #6
0
 def test_kqueue(self, kq, kqueue):
     self.assertEqual(default_implementation(), 'kqueue')