def setUp(self): self.dim = 1000 self.random_string = ''.join([random.choice('1234567890') for _ in xrange(8)]) self.tmp_dir = 'test-temp-' + self.random_string os.makedirs(self.tmp_dir) self.tmp_fname = os.path.join(self.tmp_dir, 'shcorp.' + self.random_string + '.tmp') self.data = mock_data(dim=1000) self.corpus = ShardedCorpus(self.tmp_fname, self.data, dim=self.dim, shardsize=100)
def setUp(self): self.dim = 1000 self.random_string = ''.join(random.choice('1234567890') for _ in range(8)) self.tmp_dir = 'test-temp-' + self.random_string os.makedirs(self.tmp_dir) self.tmp_fname = os.path.join(self.tmp_dir, 'shcorp.' + self.random_string + '.tmp') self.data = mock_data(dim=1000) self.corpus = ShardedCorpus(self.tmp_fname, self.data, dim=self.dim, shardsize=100)