Skip to content

Commit

Permalink
fix: fix data
Browse files Browse the repository at this point in the history
  • Loading branch information
terryyz committed May 7, 2024
1 parent bb452a1 commit bdc9688
Show file tree
Hide file tree
Showing 7 changed files with 813 additions and 824 deletions.
1 change: 0 additions & 1 deletion data/clean/f_417_jenny.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ def setUp(self):
def tearDown(self):
# Close matplotlib plots and remove temporary directory
plt.close("all")
shutil.rmtree(self.test_dir)

def test_case_1(self):
# Test basic functionality with 100 rolls and 2 dice
Expand Down
5 changes: 1 addition & 4 deletions data/clean/f_682_simon.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,10 @@ class TestCases(unittest.TestCase):
def setUp(self):
self.temp_folder = tempfile.mkdtemp()

def tearDown(self):
shutil.rmtree(self.temp_folder)

def test_case_1(self):
result = f_682(['a', 'b', 'a', 'c', 'a'], 'a', self.temp_folder)
self.assertEqual(result, 3)
with open(TestCases.temp_folder+'/f_682.log') as log:
with open(self.temp_folder+'/f_682.log') as log:
self.assertTrue("INFO:Function called with list: ['a', 'b', 'a', 'c', 'a'] and element: a" in log.readline())
self.assertTrue("INFO:Frequency of 'a' is 3" in log.readline())

Expand Down
1,620 changes: 810 additions & 810 deletions data/open-eval.jsonl

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion data/processed/f_417_jenny_wo_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ def setUp(self):
def tearDown(self):
# Close matplotlib plots and remove temporary directory
plt.close("all")
shutil.rmtree(self.test_dir)
def test_case_1(self):
# Test basic functionality with 100 rolls and 2 dice
result, ax = f_112(100, 2, random_seed=42)
Expand Down
4 changes: 1 addition & 3 deletions data/processed/f_682_simon_wo_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,10 @@ def f_123(letter_list, element, log_path):
class TestCases(unittest.TestCase):
def setUp(self):
self.temp_folder = tempfile.mkdtemp()
def tearDown(self):
shutil.rmtree(self.temp_folder)
def test_case_1(self):
result = f_123(['a', 'b', 'a', 'c', 'a'], 'a', self.temp_folder)
self.assertEqual(result, 3)
with open(TestCases.temp_folder+'/f_123.log') as log:
with open(self.temp_folder+'/f_123.log') as log:
self.assertTrue("INFO:Function called with list: ['a', 'b', 'a', 'c', 'a'] and element: a" in log.readline())
self.assertTrue("INFO:Frequency of 'a' is 3" in log.readline())
def test_case_2(self):
Expand Down
1 change: 0 additions & 1 deletion data/raw/f_417_jenny.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ def setUp(self):
def tearDown(self):
# Close matplotlib plots and remove temporary directory
plt.close("all")
shutil.rmtree(self.test_dir)

def test_case_1(self):
# Test basic functionality with 100 rolls and 2 dice
Expand Down
5 changes: 1 addition & 4 deletions data/raw/f_682_simon.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,10 @@ class TestCases(unittest.TestCase):
def setUp(self):
self.temp_folder = tempfile.mkdtemp()

def tearDown(self):
shutil.rmtree(self.temp_folder)

def test_case_1(self):
result = f_682(['a', 'b', 'a', 'c', 'a'], 'a', self.temp_folder)
self.assertEqual(result, 3)
with open(TestCases.temp_folder+'/f_682.log') as log:
with open(self.temp_folder+'/f_682.log') as log:
self.assertTrue("INFO:Function called with list: ['a', 'b', 'a', 'c', 'a'] and element: a" in log.readline())
self.assertTrue("INFO:Frequency of 'a' is 3" in log.readline())

Expand Down

0 comments on commit bdc9688

Please sign in to comment.