Closed SinghHimadri closed 4 years ago
The test is running successfully I don't think there are any issues. Please review @rpotter12 @xandao6
Hi @SinghHimadri Please check your Pr there is increased complexity with your files
Do resolve them and update your PR :+1:
Changed to medium difficulty because just solve one of the many possible tests.
@SinghHimadri add them in the test folder and work on further tests :+1: @xandao6 She will be adding more test cases in the future.
Here is an overview of what got changed by this pull request:
Issues
======
- Added 5
Complexity increasing per file
==============================
- tests/test_func.py 7
- tests/test_kill_child_process.py 1
See the complete overview on Codacy
@SinghHimadri add these in test folder
Change done.
LGTM.....I have not tested it yet.
I have added command for running tests in test_kill_chil_process. You can test it 🙂
102
Closes: # (issue number)
Proposed changes
Successful test added for kill_chil_process Brief description of what is fixed or changed To create a child process subprocess library has been used a function get_test_subprocess() which does nothing for 30 sec has been written. This test works in all MACOS, WINDOWS, and Linux. Since this test deals with os part all care has been taken and os.fork had many limitations so subprocess is used. The logic for the test is a child is created its process id is stored then this child process is killed using kill_child_process function and then checks is this id still exists in our os using psutil.pid_exists(test_pid) we self assert false. As the process is killed so it returns false and we assert it.
Types of changes
A test folder has been added. This folder contains test_kill_child_processes and test_func which contains a function that creates child process which does nothing for the next 30 sec. Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that applyScreenshots
I have written the test that works successfully and the function passes the test i.e. used kill_child_process function used. I am sharing results.Attaching screenshots![Screenshot from 2020-03-30 15-39-10](https://user-images.githubusercontent.com/36266646/77901099-a7913f00-729c-11ea-8417-c8cd58c465d6.png)
Please attach the screenshots of the changes made in case of a change in user interface
Other information
I would request to not unassign me or close this issue since this is the first automated unit test added. I am writing more tests and will be sending their PR soon. Also, I haven't updated documentation because more tests are to be added. I'll update once all test cases are added. Any other information that is important to this pull request