Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
eaed575
fix doctest output
imamnurby May 1, 2024
7efb244
[1030] refine docstring and implementation
imamnurby May 1, 2024
fde3229
[1030] refine test cases using setUp and tearDown method
imamnurby May 1, 2024
6fc2e42
[1029] refine docstring description and remove unused libraries
imamnurby May 1, 2024
0fd7f4e
fix bug in the VALID_JSON_STRUCTURE constant, refine testcases
imamnurby May 1, 2024
d234a04
refine docstring
imamnurby May 1, 2024
c994597
move out the test cases from run_test function, rename test class to …
imamnurby May 1, 2024
6a54fdd
fix docstring expected output
imamnurby May 1, 2024
e3b577d
improve test cases
imamnurby May 1, 2024
6c353b9
remove typing
imamnurby May 1, 2024
9ae63d5
refine docstring
imamnurby May 1, 2024
e901168
add a test case to check the payload
imamnurby May 1, 2024
e35882a
refine docstring
imamnurby May 1, 2024
999007e
rename unittest class
imamnurby May 1, 2024
9f93f4f
refine testcases
imamnurby May 1, 2024
1c4a053
refine docstring
imamnurby May 1, 2024
f141346
refine testcases
imamnurby May 1, 2024
6050eb0
refine docstring
imamnurby May 1, 2024
6dc6c56
refine testcases
imamnurby May 1, 2024
809f4cd
refine docstring
imamnurby May 1, 2024
8a76c49
refine testcases, add Raises in the docstring
imamnurby May 1, 2024
a72de9a
refine docstring
imamnurby May 1, 2024
4842b4f
refine testcases
imamnurby May 1, 2024
48b4b74
refine docstring
imamnurby May 1, 2024
52dc438
refine testcases
imamnurby May 1, 2024
bed6ad8
refine doctstring
imamnurby May 2, 2024
e6b8adf
refine testcases
imamnurby May 2, 2024
048d45c
refine docstring
imamnurby May 2, 2024
075897c
refine testcases
imamnurby May 2, 2024
5d79adb
refine docstring
imamnurby May 3, 2024
af2f47a
refine docstring and testcases
imamnurby May 3, 2024
3948747
refine docstring
imamnurby May 3, 2024
3c73dcf
refine testcases
imamnurby May 3, 2024
fd68ac1
remove unused import
imamnurby May 3, 2024
cef46b3
add import
imamnurby May 3, 2024
d0daeb0
refine docstring
imamnurby May 3, 2024
bcb42e4
refine testcases
imamnurby May 3, 2024
73469f4
refine docstring
imamnurby May 3, 2024
1f9d19a
refine docstring and testcases
imamnurby May 3, 2024
dbda3df
refine docstring and testcases
imamnurby May 3, 2024
62ece73
refine docstring
imamnurby May 3, 2024
f4f91f2
refine docstring
imamnurby May 4, 2024
3ea0517
refine testcases
imamnurby May 4, 2024
464cfd3
refine docstring
imamnurby May 4, 2024
c53df91
refine docstring
imamnurby May 4, 2024
5788154
refine testcases
imamnurby May 4, 2024
ff160e4
refine testcases
imamnurby May 4, 2024
ec8f2ef
refien docstring and testcases
imamnurby May 4, 2024
dc16c13
refine docstring
imamnurby May 4, 2024
6dbada6
refine docstring and testcases
imamnurby May 4, 2024
3e7cfc5
refine docstring
imamnurby May 4, 2024
04b0c12
refine testcases
imamnurby May 4, 2024
099cc79
refine testcases
imamnurby May 4, 2024
00b517b
refine docstring and testcases
imamnurby May 4, 2024
3b296da
refine docstring and testcases
imamnurby May 4, 2024
abc98d6
refine docstring and add statistics library
imamnurby May 4, 2024
fcfa0ae
refine testcases
imamnurby May 4, 2024
cb335b0
refine testcases, add Raises section in the docstring
imamnurby May 4, 2024
831b0dd
refine docstring and testcases, modify the implementation to use the …
imamnurby May 4, 2024
9a1f33b
refine docstring and testcases, add helper function to check mse value
imamnurby May 4, 2024
810293e
refine docstring and testcases
imamnurby May 4, 2024
e17b2fb
add docstring and refine testcases
imamnurby May 4, 2024
12eca2f
refine docstring and testcases
imamnurby May 4, 2024
fc358b9
refine docstring and testcases
imamnurby May 4, 2024
437bbe2
refine docstring and testcases
imamnurby May 4, 2024
f910eae
refine testcases and docstring
imamnurby May 5, 2024
0827422
refine docstring and testcases, add Raises
imamnurby May 5, 2024
2d6696a
refine docstring and move loading sql inside the function
imamnurby May 5, 2024
bea53e8
refine docstring and testcases
imamnurby May 5, 2024
ab7c50e
refine testcases and docstring
imamnurby May 6, 2024
9f5f78a
refine docstring and testcases
imamnurby May 6, 2024
0232eba
remove duplicate import statements and mock class
imamnurby May 6, 2024
5b48a67
add Requirements in the docstring
imamnurby May 6, 2024
c632a7a
remove print
imamnurby May 6, 2024
151f63e
remove print
imamnurby May 6, 2024
3335ec7
refine docstring
imamnurby May 6, 2024
f4648eb
fix implementation and refine testcases
imamnurby May 6, 2024
8ab7d08
refine docstring and testcases
imamnurby May 6, 2024
3b917e2
refine testcases
imamnurby May 6, 2024
c40f70f
refine docstring
imamnurby May 6, 2024
376fd52
refine and add more testcases, add missing import
imamnurby May 6, 2024
a79c547
refine docstring and testcases
imamnurby May 6, 2024
0bcdfa3
update the docstring
imamnurby May 6, 2024
a4299b5
refine testcases and docstring
imamnurby May 6, 2024
8911a3e
fix duplicate runner method, rename test class
imamnurby May 6, 2024
b539253
refine docstring and testcases
imamnurby May 6, 2024
86df211
refine docstring and testcases
imamnurby May 6, 2024
ebe6e10
refine docstring and testcases
imamnurby May 6, 2024
127b5aa
remove multiple import
imamnurby May 6, 2024
d354394
remove multiple import
imamnurby May 6, 2024
d2477c1
refine docstring
imamnurby May 6, 2024
bf77ef6
update example
imamnurby May 6, 2024
6da3bfe
remove duplicate import
imamnurby May 6, 2024
3d1d11e
remove comments
imamnurby May 6, 2024
8ab8219
remove duplicate import
imamnurby May 6, 2024
6c24263
update import
imamnurby May 6, 2024
248f4e4
add Raises section, make the testcases more deterministic
imamnurby May 6, 2024
5d732f3
change randint to random
imamnurby May 6, 2024
228e847
make the test more specific and deterministic
imamnurby May 6, 2024
687aa93
remove constant
imamnurby May 6, 2024
9c94bfd
refine docstring and testcases
imamnurby May 7, 2024
876026a
add Requirements in the docstring
imamnurby May 7, 2024
03157a0
remove explanation in Requirments
imamnurby May 7, 2024
8bbd4b8
fix indentation
imamnurby May 7, 2024
6285360
separte testcases
imamnurby May 7, 2024
fd604d0
move constant as the default param
imamnurby May 7, 2024
5d9af2d
Move THRESHOLD to optional param
imamnurby May 7, 2024
ade40b0
add type of K
imamnurby May 7, 2024
cb26fc2
move SALTH_LENGTH to optional param
imamnurby May 7, 2024
7702642
move DATE_FORMAT to optional param
imamnurby May 7, 2024
943584c
fix wrong argument in datetime.strptime in the testcase
imamnurby May 7, 2024
fb24d18
move VALID_JSON_STRUCTURE and EMAIL_REGEX to optional param
imamnurby May 7, 2024
cac15bc
Add default values in the docstring
imamnurby May 7, 2024
4222532
fix testcases
imamnurby May 7, 2024
afcb5ce
modify example in the docstring
imamnurby May 7, 2024
e4de8b0
remove unused import
imamnurby May 7, 2024
765695e
fix the example in the docstring
imamnurby May 7, 2024
37a0107
fix the example in the docstring
imamnurby May 7, 2024
7e9af83
add .db in check_test_wo_doc
imamnurby May 7, 2024
fad8c1f
add subprocess in check_test_wo_doc
imamnurby May 7, 2024
d840f31
separate the testcase to check the number of updated hash and the cor…
imamnurby May 7, 2024
3d40647
refine the testcases
imamnurby May 7, 2024
f4d3de0
refine testcases
imamnurby May 7, 2024
25062ec
rename files
imamnurby May 7, 2024
60a6070
cleanup files
imamnurby May 7, 2024
a076144
update script
imamnurby May 7, 2024
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove unused import
  • Loading branch information
imamnurby committed May 3, 2024
commit fd68ac15f1bea23e191f2a7fce5e81c6877bdb4c
17 changes: 7 additions & 10 deletions data/raw/f_1017_zhihan.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,6 @@ def f_1017(process_name: str) -> str:
subprocess.Popen(process_name)
return f"Process not found. Starting {process_name}."


import unittest

def run_tests():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestCases))
runner = unittest.TextTestRunner()
runner.run(suite)

import unittest
from unittest.mock import patch, MagicMock

Expand Down Expand Up @@ -91,6 +82,12 @@ def test_process_terminates_and_restarts_multiple_instances(self, mock_popen, mo
process1.terminate.assert_called_once()
process2.terminate.assert_called_once()
mock_popen.assert_called_once_with('multi_instance')


def run_tests():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestCases))
runner = unittest.TextTestRunner()
runner.run(suite)

if __name__ == "__main__":
run_tests()