<commit_before>#!/usr/bin/python
from finaImport import finaImport 
import unittest
import os

class testImport(unittest.TestCase):
  '''Tests for importing a CSV file'''

  def setUp(self):
    toeFile = open(os.path.join("data", "toe"), "w+")
 
  def tearDown(self):
    os.remove(os.path.join("data", "toe"))

  def testDataDirExists(self):
    '''Test that the data directory exists'''
    self.assertTrue(os.path.exists("data"))

  def testImportCSV(self):
    ''' Test a good file '''
    self.assertIsInstance(finaImport.importCSV("toe") , file)<commit_msg>still not using fixtures but got the test working with a setup line<commit_after>#!/usr/bin/python
from finaImport import finaImport 
import unittest
import os

class testImport(unittest.TestCase):
  '''Tests for importing a CSV file'''

  def setUp(self):
    finaImport.importCSV("buttface")
    toeFile = open(os.path.join("data", "toe"), "w+")
 
  def tearDown(self):
    os.remove(os.path.join("data", "toe"))

  def testDataDirExists(self):
    '''Test that the data directory exists'''
    self.assertTrue(os.path.exists("data"))

  def testImportCSV(self):
    ''' Test a good file '''
    self.assertIsInstance(finaImport.importCSV("toe") , file)
{'fraction_non_alphanumeric': 0.14848236259228875, 'fraction_numerical': 0.0, 'mean_word_length': 4.4708520179372195, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3274846', 'n_tokens_mistral': 413, 'n_tokens_neox': 397, 'n_words': 100}