### Run All Tests Source: https://github.com/getfernand/unquotemail/blob/master/README.md Execute the entire test suite using pytest. Ensure pytest is installed. ```bash pytest ``` -------------------------------- ### Conditional Parsing of Emails Source: https://github.com/getfernand/unquotemail/blob/master/README.md Demonstrates how to control the parsing process. Parsing can be deferred by setting `parse=False` during instantiation, allowing for conditional execution of the `parse()` method. ```python unquote = Unquote(email_html, email_text, parse=False) if not is_new_email: # We don't unquote a new email as we want to keep the context # But for all following emails, we do want to remove that context since we already have it unquote.parse() message = Message(unquote.get_html(), unquote.get_text()) message.save() # in the database ``` -------------------------------- ### Run Specific Test Source: https://github.com/getfernand/unquotemail/blob/master/README.md Execute a single test case by its name using pytest's -k flag. This is useful for debugging specific issues. ```bash pytest -k "test_unquote[talon_9.html-talon_9.html]" ``` -------------------------------- ### Delete All Keys in a Riak Bucket (Java) Source: https://github.com/getfernand/unquotemail/blob/master/tests/samples/email_2.txt Use this snippet to iterate through all keys in a specified Riak bucket and delete each one individually. This is the recommended approach when a direct bucket deletion feature is not available. ```Java String bucket = "my_bucket"; BucketResponse bucketResponse = riakClient.listBucket(bucket); RiakBucketInfo bucketInfo = bucketResponse.getBucketInfo(); for(String key : bucketInfo.getKeys()) { riakClient.delete(bucket, key); } ``` -------------------------------- ### Basic Email Parsing with Unquote Source: https://github.com/getfernand/unquotemail/blob/master/README.md Instantiate the Unquote class with HTML and text content of an email to retrieve the cleaned HTML version. This is the primary method for removing previous conversation threads. ```python from unquotemail import Unquote # You previously retrieved the text/html and text/plain version of an email unquote = Unquote(email_html, email_text) print(unquote.get_html()) # Will output the email without the included replies. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.