<commit_before>"""Unit test for persistent_queue.py"""


__author__ = "<NAME> (<EMAIL>)"
__version__ = "$Rev$"
__date__ = "$Date$"
__license__ = "GPL"


from persistent_queue import *
import os
import unittest


class TestConditions(unittest.TestCase):
    def setUp(self):
        os.remove("persistent_queue.db")


    def testEmpty(self):
        pq = PersistentQueue()
        self.assertRaises(Empty, pq.get)


    def testBasicUsage(self):
        pq = PersistentQueue()<commit_msg>Hardened the test a bit and improved the documentation.<commit_after>"""Unit test for persistent_queue.py"""


__author__ = "<NAME> (<EMAIL>)"
__version__ = "$Rev$"
__date__ = "$Date$"
__license__ = "GPL"


from persistent_queue import *
import os
import os.path
import unittest


class TestConditions(unittest.TestCase):
    def setUp(self):
        if os.path.exists("persistent_queue.db"):
            os.remove("persistent_queue.db")


    def testEmpty(self):
        pq = PersistentQueue()
        self.assertRaises(Empty, pq.get)


    def testBasicUsage(self):
        pq = PersistentQueue()
{'fraction_non_alphanumeric': 0.125114995400184, 'fraction_numerical': 0.0, 'mean_word_length': 3.689655172413793, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5882901', 'n_tokens_mistral': 359, 'n_tokens_neox': 339, 'n_words': 81}