<commit_before>import unittest
import downloads
import os

class DownloadsTest(unittest.TestCase):

    def test_downloads(self):
        out_path = downloads.download('http://i.imgur.com/ij2h06p.png')
        self.assertEqual(os.path.exists(out_path), True)


    def test_downloads_with_out_path(self):
        out_path = downloads.download(
            'http://i.imgur.com/i5pJRxX.jpg',
            out_path='cheezburger.jpg'
        )

        self.assertEqual(os.path.exists('cheezburger.jpg'), True)


    def test_downloads_https(self):
        out_path = downloads.download('https://i.imgur.com/ij2h06p.png', out_path='http-test.png')
        self.assertEqual(os.path.exists(out_path), True)


    def test_downloads_with_progress(self):
        out_path = downloads.download('https://i.imgur.com/ij2h06p.png', progress=True)
        self.assertEqual(os.path.exists(out_path), True)


    def test_strips_parameters(self):
        out_path = downloads.download('https://media.giphy.com/media/JIX9t2j0ZTN9S/giphy.gif?a=b&c=d')
        self.assertEqual(os.path.exists('giphy.gif'), True)<commit_msg>Switch to pytest<commit_after>import downloads
import os


def test_downloads():
    out_path = downloads.download("http://i.imgur.com/ij2h06p.png")
    assert os.path.exists(out_path) == True


def test_downloads_with_out_path():
    out_path = downloads.download(
        "http://i.imgur.com/i5pJRxX.jpg", out_path="cheezburger.jpg"
    )

    assert os.path.exists("cheezburger.jpg")


def test_downloads_https():
    out_path = downloads.download(
        "https://i.imgur.com/ij2h06p.png", out_path="http-test.png"
    )
    assert os.path.exists(out_path)


def test_downloads_with_progress():
    out_path = downloads.download(
        "https://i.imgur.com/ij2h06p.png", progress=True
    )
    assert os.path.exists(out_path)


def test_strips_parameters():
    out_path = downloads.download(
        "https://media.giphy.com/media/JIX9t2j0ZTN9S/giphy.gif?a=b&c=d"
    )
    assert os.path.exists("giphy.gif")
{'fraction_non_alphanumeric': 0.1394658753709199, 'fraction_numerical': 0.013847675568743818, 'mean_word_length': 3.465783664459161, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 31, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1644041', 'n_tokens_mistral': 754, 'n_tokens_neox': 717, 'n_words': 85}