Exemplo n.º 1
0
 def test_dup_file(self):
     with event_file(self.ivoid) as f:
         self.assertEqual(f.name, self.filename + FILENAME_PAD)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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))
Exemplo n.º 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 + ".")
Exemplo n.º 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))
Exemplo n.º 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 + ".")
Exemplo n.º 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)
Exemplo n.º 9
0
 def test_dup_file(self):
     with event_file(self.ivoid) as f:
         self.assertEqual(f.name, self.filename + FILENAME_PAD)