def test_exists(self): dir_path = self.get_test_path('test_exists') file_path = join(dir_path, 'file') assert_false(self.fs.exists(dir_path)) assert_false(self.fs.exists(file_path)) self.fs.create(file_path) assert_true(self.fs.exists(dir_path)) assert_true(self.fs.exists(file_path)) assert_true(self.fs.exists('s3a://%s' % self.bucket_name)) assert_true(self.fs.exists('s3a://')) fake_bucket = 'fake%s' % generate_id(8, string.ascii_lowercase + string.digits) assert_false(self.fs.exists('s3a://%s' % fake_bucket))
def test_exists(self): dir_path = self.get_test_path('test_exists') file_path = join(dir_path, 'file') assert_false(self.fs.exists(dir_path)) assert_false(self.fs.exists(file_path)) self.fs.create(file_path) assert_true(self.fs.exists(dir_path)) assert_true(self.fs.exists(file_path)) assert_true(self.fs.exists('s3://%s' % self.bucket_name)) assert_true(self.fs.exists('s3://')) fake_bucket = 'fake%s' % generate_id(8, string.ascii_lowercase + string.digits) assert_false(self.fs.exists('s3://%s' % fake_bucket))