예제 #1
0
 def test_dup_file(self):
     with event_file(self.ivoid) as f:
         self.assertEqual(f.name, self.filename + FILENAME_PAD)
예제 #2
0
 def test_temp_dir(self):
     with temp_dir() as tmpdir:
         with event_file(self.ivoid, dirname=tmpdir) as f:
             self.assertEqual(os.path.dirname(f.name), tmpdir)
예제 #3
0
 def test_temp_dir(self):
     with temp_dir() as tmpdir:
         with event_file(self.ivorn, dirname=tmpdir) as f:
             self.assertEqual(os.path.dirname(f.name), tmpdir)
예제 #4
0
 def setUp(self):
     self.ivoid = "ivo://test.ivoid/1234#5678"
     with event_file(self.ivoid) as f:
         f.write("Test data")
     self.filename = os.path.join(os.getcwd(),
                                  string_to_filename(self.ivoid))
예제 #5
0
 def test_dup_file(self):
     self.ivorn = "ivo://test.ivorn/1234#5678"
     with event_file(self.ivorn) as f:
         self.assertEqual(f.name, self.filename + ".")
예제 #6
0
 def setUp(self):
     self.ivorn = "ivo://test.ivorn/1234#5678"
     with event_file(self.ivorn) as f:
         f.write("Test data")
     self.filename = os.path.join(os.getcwd(), string_to_filename(self.ivorn))
예제 #7
0
 def test_dup_file(self):
     self.ivoid = "ivo://test.ivoid/1234#5678"
     with event_file(self.ivoid) as f:
         self.assertEqual(f.name, self.filename + ".")
예제 #8
0
 def test_temp_dir(self):
     with TemporaryDirectory() as tmpdir:
         with event_file(self.ivoid, dirname=tmpdir) as f:
             self.assertEqual(os.path.dirname(f.name), tmpdir)
예제 #9
0
 def test_dup_file(self):
     with event_file(self.ivoid) as f:
         self.assertEqual(f.name, self.filename + FILENAME_PAD)