<commit_before>"""

Test the script webservice-image-digest by calling this from 
the tests directory

cd compose_setup/scripts/tests
python test-webservice-image-digest.py

"""

import unittest

import subprocess

script_location = "../webservice-image-digest.py"

base_command = "python {}".format(script_location)
branch = "develop"
simple_tag = "digest_test"
annotated_tag = "1.12.0-beta.1"

class TestDigest(unittest.TestCase):

    def test_branch(self):
        cmd = "{} {}".format(base_command, branch)
        ret = subprocess.check_output(cmd, shell=True, universal_newlines=True).rstrip()
        self.assertEqual(ret, "sha256:52cf6b09e89a238bfd1d98dd01139442d67fcaaa377c179f315dd06555f7bcae")
        pass

    def test_simple_tag(self):
        cmd = "{} {}".format(base_command, simple_tag)
        ret = subprocess.check_output(cmd, shell=True, universal_newlines=True).rstrip()
        self.assertEqual(ret, "sha256:f21d00e9f01d54eb891c128fb88b76554cb0b47c775929dc05e39a03954e7b0b")
        pass

    def test_annotated_tag(self):
        cmd = "{} {}".format(base_command, annotated_tag)
        ret = subprocess.check_output(cmd, shell=True, universal_newlines=True).rstrip()
        self.assertEqual(ret, "sha256:e6dcfdc9ea351b57cde556ff3c68f96b838e8e30cdb4ee693a29b6ef16f3a4be")
        pass

if __name__ == '__main__':
    unittest.main()<commit_msg>Turn off a test that was incorrectly specified (#229)<commit_after>"""

Test the script webservice-image-digest by calling this from 
the tests directory

cd compose_setup/scripts/tests
python test-webservice-image-digest.py

"""

import unittest

import subprocess

script_location = "../webservice-image-digest.py"

base_command = "python {}".format(script_location)
branch = "develop"
simple_tag = "digest_test"
annotated_tag = "1.12.0-beta.1"

class TestDigest(unittest.TestCase):

# This test is turned off because there is no stable branch to test against
#    def test_branch(self):
#        cmd = "{} {}".format(base_command, branch)
#        ret = subprocess.check_output(cmd, shell=True, universal_newlines=True).rstrip()
#        self.assertEqual(ret, "sha256:52cf6b09e89a238bfd1d98dd01139442d67fcaaa377c179f315dd06555f7bcae")
#        pass

    def test_simple_tag(self):
        cmd = "{} {}".format(base_command, simple_tag)
        ret = subprocess.check_output(cmd, shell=True, universal_newlines=True).rstrip()
        self.assertEqual(ret, "sha256:f21d00e9f01d54eb891c128fb88b76554cb0b47c775929dc05e39a03954e7b0b")
        pass

    def test_annotated_tag(self):
        cmd = "{} {}".format(base_command, annotated_tag)
        ret = subprocess.check_output(cmd, shell=True, universal_newlines=True).rstrip()
        self.assertEqual(ret, "sha256:e6dcfdc9ea351b57cde556ff3c68f96b838e8e30cdb4ee693a29b6ef16f3a4be")
        pass

if __name__ == '__main__':
    unittest.main()
{'fraction_non_alphanumeric': 0.11134380453752181, 'fraction_numerical': 0.08900523560209424, 'mean_word_length': 4.554263565891473, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4883157', 'n_tokens_mistral': 1160, 'n_tokens_neox': 1005, 'n_words': 167}