Skip to content

Commit

Permalink
Fix hdfs tests
Browse files Browse the repository at this point in the history
  • Loading branch information
danepitkin committed Aug 23, 2023
1 parent eb2314e commit 1a5b32b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions python/pyarrow/tests/test_hdfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import os
import random
import unittest
from io import BytesIO
from os.path import join as pjoin

Expand Down Expand Up @@ -80,14 +79,14 @@ def _make_test_file(self, hdfs, test_name, test_path, test_data):
return full_path

@classmethod
def setUpClass(cls):
def setup_class(cls):
cls.check_driver()
cls.hdfs = hdfs_test_client()
cls.tmp_path = '/tmp/pyarrow-test-{}'.format(random.randint(0, 1000))
cls.hdfs.mkdir(cls.tmp_path)

@classmethod
def tearDownClass(cls):
def teardown_class(cls):
cls.hdfs.delete(cls.tmp_path, recursive=True)
cls.hdfs.close()

Expand Down Expand Up @@ -391,7 +390,7 @@ def test_write_to_dataset_no_partitions(self):
tmpdir, filesystem=self.hdfs)


class TestLibHdfs(HdfsTestCases, unittest.TestCase):
class TestLibHdfs(HdfsTestCases):

@classmethod
def check_driver(cls):
Expand Down

0 comments on commit 1a5b32b

Please sign in to comment.