Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✅ Tests: Added DeFFcode unit tests with pytest. (Fixes #3) #13

Merged
merged 7 commits into from
Mar 17, 2022
Merged

Conversation

abhiTronix
Copy link
Owner

Brief Description

This PR implements complete pytest unit tests for DeFFcode APIs.

Requirements / Checklist

  • I have read the DeFFcode PR Guidelines.
  • I have read the DeFFcode Documentation.
  • I have updated the documentation files accordingly(if required).

Related Issue

#3

Context

This PR brings complete pytest unit tests for DeFFcode APIs for comprehensively testing their stable working under different environments, and quickly discovering any anomalies if present in the respective code. This PR also imports bash scripts and useful functions from vidgear necessary for unit test working.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

- 📝 Updated Download Test Datasets instructions.
- 🍱 Added `essential.py` for defining all essential functions necessary for DeFFcode unit tests.
- ✨ Added `return_static_ffmpeg`, `remove_file_safe`, `return_testvideo_path`, return_generated_frames_path, `actual_frame_count_n_frame_size` essential functions.
- ✨ Added `is_windows` global variable.
- ✨ Added related imports and logging.
- 🍱 Added `__init__.py`.
- 🚚 Moved all files to `test` folder.

(Note: Most of this code is borrowed from https://github.com/abhiTronix/vidgear)
- ✨ Added new `test_loggerhandler` and `test_dict2Args` tests.
- ✨ Added related imports and logging.

(Note: Most of this code is borrowed from https://github.com/abhiTronix/vidgear)
- ✨ Added new `test_ffmpeg_binaries_download`, `test_validate_ffmpeg`, `test_get_valid_ffmpeg_path`, `test_check_sp_output`, `test_is_valid_url`, `test_is_valid_image_seq`, and `test_validate_imgseqdir` parametrize tests.
- ✨ Added related imports and logging.

(Note: Most of this code is borrowed from https://github.com/abhiTronix/vidgear)
- ✨ Added new `test_source` and `test_probe_stream_n_retrieve_metadata` parametrize tests.
- ✨ Added related imports and logging.
- ✨ Added new `test_source_playback`, `test_frame_format`, `test_metadata`, `test_seek_n_save`,  and `test_FFdecoder_params` parametrize unit tests.
- ✨ Added related imports and logging.
@abhiTronix abhiTronix added Bug 🐞 Something's wrong with Deffcode APIs. Documentation 📑 Improvements or additions to DeFFcode documentation. Enhancement ⚡ New feature Issue/Request enhancing DeFFcode APIs. WIP 🏗️ Work in Progress labels Mar 17, 2022
@abhiTronix abhiTronix added this to the v0.2.0 milestone Mar 17, 2022
@abhiTronix abhiTronix self-assigned this Mar 17, 2022
@abhiTronix abhiTronix added this to In progress in Deffcode v0.2.0 via automation Mar 17, 2022
@abhiTronix abhiTronix added the Unit Tests 🧪 Related to DeFFcode unit tests. label Mar 17, 2022
@abhiTronix abhiTronix linked an issue Mar 17, 2022 that may be closed by this pull request
13 tasks
@abhiTronix abhiTronix merged commit 998dd09 into master Mar 17, 2022
Deffcode v0.2.0 automation moved this from In progress to Done Mar 17, 2022
@abhiTronix abhiTronix deleted the dev branch March 17, 2022 06:26
@abhiTronix abhiTronix added Solved 🥅 Final goal achieved. and removed WIP 🏗️ Work in Progress labels Mar 17, 2022
@abhiTronix abhiTronix added Bug Fix 🐛 💣 Bug fix in progress !!! and removed Bug 🐞 Something's wrong with Deffcode APIs. labels Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Fix 🐛 💣 Bug fix in progress !!! Documentation 📑 Improvements or additions to DeFFcode documentation. Enhancement ⚡ New feature Issue/Request enhancing DeFFcode APIs. Solved 🥅 Final goal achieved. Unit Tests 🧪 Related to DeFFcode unit tests.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Enhancement: Implement pytest unit tests, coverage, and Continous Integration
1 participant