मुख्य सामग्री पर जाएँ
Skillpedia
टेस्टिंग40k · #7349

pytest-coverage

यह क्या करती है

यह tool जाँचने में मदद करता है कि आपका सारा code टेस्ट हो रहा है या नहीं। यह दिखाता है कि code का कौन सा हिस्सा टेस्ट नहीं हो रहा, ताकि आप और टेस्ट जोड़ सकें।

कब इस्तेमाल करें

  • ✓जब आप चाहते हैं कि आपके टेस्ट पूरे code को कवर करें।
  • ✓जब आपको वे हिस्से ढूँढने हों जिनके लिए कोई टेस्ट नहीं है।
  • ✓जब लक्ष्य यह हो कि आपके 100% code का टेस्ट हो।

Skill का लिंक

https://github.com/github/awesome-copilot/blob/main/skills/pytest-coverage/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/github/awesome-copilot/blob/main/skills/pytest-coverage/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरे project का test coverage जाँचो और बताओ कि कहाँ टेस्ट नहीं हैं।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

tool आपके टेस्ट चलाता है और देखता है कि code की कौन सी लाइनें चलीं। यह एक रिपोर्ट बनाता है जिसमें वे लाइनें दिखती हैं जो टेस्ट नहीं हुईं, और उन पर '!' का निशान लगा होता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

The goal is for the tests to cover all lines of code.

Generate a coverage report with:

pytest --cov --cov-report=annotate:cov_annotate

If you are checking for coverage of a specific module, you can specify it like this:

pytest --cov=your_module_name --cov-report=annotate:cov_annotate

You can also specify specific tests to run, for example:

pytest tests/test_your_module.py --cov=your_module_name --cov-report=annotate:cov_annotate

Open the cov_annotate directory to view the annotated source code. There will be one file per source file. If a file has 100% source coverage, it means all lines are covered by tests, so you do not need to open the file.

For each file that has less than 100% test coverage, find the matching file in cov_annotate and review the file.

If a line starts with a ! (exclamation mark), it means that the line is not covered by tests. Add tests to cover the missing lines.

Keep running the tests and improving coverage until all lines are covered.

अक्सर पूछे जाने वाले सवाल

'code coverage' का क्या मतलब है?

Code coverage एक माप है जो बताता है कि आपके टेस्ट ने code के किन हिस्सों को चलाया। लक्ष्य 100% code को कवर करना होता है।

'cov_annotate' directory क्या है?

यह एक folder है जिसमें tool ऐसी files सेव करता है जो लाइन-दर-लाइन दिखाती हैं कि code का कौन सा हिस्सा टेस्ट हुआ और कौन सा नहीं।

मुझे कैसे पता चलेगा कि मुझे और टेस्ट जोड़ने की ज़रूरत है?

अगर रिपोर्ट में किसी code file की कुछ लाइनों पर '!' लगा है, तो इसका मतलब है वे लाइनें टेस्ट नहीं हुईं और उनके लिए टेस्ट जोड़ने होंगे।

जानकारी

लेखक का मूल विवरण

Run pytest tests with coverage, discover lines missing coverage, and increase coverage to 100%.

repo: github/awesome-copilot

लोकप्रियता

GitHub स्टार
40k
रैंकिंग में स्थान
#7349
लाइसेंस
MIT
अपडेट की गई
15/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

acquire-codebase-knowledge

40k

आपके एजेंट को किसी मौजूदा code प्रोजेक्ट को समझने और उसका documentation बनाने में मदद करता है। यह नए लोगों को प्रोजेक्ट से जोड़ने या architecture का सार जानने में उपयोगी है।

लेखन और डॉक्यूमेंटडॉक्यूमेंटेशन

acreadiness-assess

40k

आपके एजेंट को किसी प्रोजेक्ट की AI के लिए तैयारी जाँचने और रिपोर्ट बनाने देता है। यह समझने में उपयोगी है कि प्रोजेक्ट AI tools इस्तेमाल करने के लिए कितना तैयार है।

लेखन और डॉक्यूमेंटडॉक्यूमेंटेशन

acreadiness-generate-instructions

40k

आपके एजेंट को assessment के आधार पर AI tools के लिए निर्देश बनाने में मदद करता है। यह बताता है कि AI कोड के साथ बेहतर कैसे काम करे और पहचानी गई कमियाँ कैसे दूर हों।

लेखन और डॉक्यूमेंटडॉक्यूमेंटेशन

acreadiness-policy

40k

आपके एजेंट को AI प्रोजेक्ट assessment के लिए नीतियाँ तय करने या लागू करने में मदद करता है। यह प्रोजेक्ट्स के मूल्यांकन को मानक बनाने और compliance सुनिश्चित करने में उपयोगी है।

AI और एजेंटएजेंट

मिलती-जुलती skills