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