<commit_before># -*- coding: utf-8 -*-

import pendulum
from datetime import datetime
from pendulum import timezone
from pendulum.tz.loader import Loader

from .. import AbstractTestCase


class TimezoneTest(AbstractTestCase):

    def test_basic_convert(self):
        dt = datetime(2016, 6, 1, 12, 34, 56, 123456)
        tz = timezone('Europe/Paris')
        dt = tz.convert(dt)

        self.assertEqual(2016, dt.year)
        self.assertEqual(6, dt.month)
        self.assertEqual(1, dt.day)
        self.assertEqual(12, dt.hour)
        self.assertEqual(34, dt.minute)
        self.assertEqual(56, dt.second)
        self.assertEqual(123456, dt.microsecond)
        self.assertEqual('Europe/Paris', dt.tzinfo.tz.name)
        self.assertEqual(7200, dt.tzinfo.offset)
        self.assertTrue(dt.tzinfo.is_dst)

    def test_skipped_time(self):
        dt = datetime(2013, 3, 31, 2, 30, 45, 123456)
        tz = timezone('Europe/Paris')
        dt = tz.convert(dt)

        self.assertEqual(2013, dt.year)<commit_msg>Removes unnecessary import in test_timezone file<commit_after># -*- coding: utf-8 -*-

import pendulum
from datetime import datetime
from pendulum import timezone

from .. import AbstractTestCase


class TimezoneTest(AbstractTestCase):

    def test_basic_convert(self):
        dt = datetime(2016, 6, 1, 12, 34, 56, 123456)
        tz = timezone('Europe/Paris')
        dt = tz.convert(dt)

        self.assertEqual(2016, dt.year)
        self.assertEqual(6, dt.month)
        self.assertEqual(1, dt.day)
        self.assertEqual(12, dt.hour)
        self.assertEqual(34, dt.minute)
        self.assertEqual(56, dt.second)
        self.assertEqual(123456, dt.microsecond)
        self.assertEqual('Europe/Paris', dt.tzinfo.tz.name)
        self.assertEqual(7200, dt.tzinfo.offset)
        self.assertTrue(dt.tzinfo.is_dst)

    def test_skipped_time(self):
        dt = datetime(2013, 3, 31, 2, 30, 45, 123456)
        tz = timezone('Europe/Paris')
        dt = tz.convert(dt)

        self.assertEqual(2013, dt.year)
{'fraction_non_alphanumeric': 0.12064737616478666, 'fraction_numerical': 0.06179499754781756, 'mean_word_length': 2.763837638376384, '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': '7566236', 'n_tokens_mistral': 756, 'n_tokens_neox': 635, 'n_words': 142}