80d884facc03aa44a6f70dcba14d83643e52916eauriumsys.path.append('..') # this line allows to import the extension code
80d884facc03aa44a6f70dcba14d83643e52916eaurium #def setUp(self):
80d884facc03aa44a6f70dcba14d83643e52916eaurium self.assertEqual( e.options.month_names[0], 'January' )
80d884facc03aa44a6f70dcba14d83643e52916eaurium self.assertEqual( e.options.month_names[11], 'December' )
80d884facc03aa44a6f70dcba14d83643e52916eaurium '--month-names=JAN FEV MAR ABR MAI JUN JUL AGO SET OUT NOV DEZ',
80d884facc03aa44a6f70dcba14d83643e52916eaurium '--day-names=DOM SEG TER QUA QUI SEX SAB',
80d884facc03aa44a6f70dcba14d83643e52916eaurium 'minimal-blank.svg'
80d884facc03aa44a6f70dcba14d83643e52916eaurium def test_starting_or_ending_spaces_must_not_affect_names_list(self):
80d884facc03aa44a6f70dcba14d83643e52916eaurium '--month-names= JAN FEV MAR ABR MAI JUN JUL AGO SET OUT NOV DEZ ',
80d884facc03aa44a6f70dcba14d83643e52916eaurium '--day-names= DOM SEG TER QUA QUI SEX SAB ',
80d884facc03aa44a6f70dcba14d83643e52916eaurium 'minimal-blank.svg'
80d884facc03aa44a6f70dcba14d83643e52916eaurium def test_inner_extra_spaces_must_not_affect_names_list(self):
80d884facc03aa44a6f70dcba14d83643e52916eaurium '--month-names=JAN FEV MAR ABR MAI JUN JUL AGO SET OUT NOV DEZ',
80d884facc03aa44a6f70dcba14d83643e52916eaurium '--day-names=DOM SEG TER QUA QUI SEX SAB',
80d884facc03aa44a6f70dcba14d83643e52916eaurium 'minimal-blank.svg'
80d884facc03aa44a6f70dcba14d83643e52916eaurium def test_default_year_must_be_the_current_year(self):
80d884facc03aa44a6f70dcba14d83643e52916eaurium self.assertEqual( e.options.year, datetime.today().year )
80d884facc03aa44a6f70dcba14d83643e52916eaurium def test_option_year_equal_0_is_converted_to_current_year(self):
80d884facc03aa44a6f70dcba14d83643e52916eaurium self.assertEqual( e.options.year, datetime.today().year )
80d884facc03aa44a6f70dcba14d83643e52916eaurium args = [ '--start-day=sun', '--weekend=sat+sun', 'minimal-blank.svg' ]
80d884facc03aa44a6f70dcba14d83643e52916eaurium self.assertTrue( e.is_weekend(0), 'Sunday is weekend in this configuration' )
80d884facc03aa44a6f70dcba14d83643e52916eaurium self.assertTrue( e.is_weekend(6), 'Saturday is weekend in this configuration' )
80d884facc03aa44a6f70dcba14d83643e52916eaurium self.assertFalse( e.is_weekend(1), 'Monday is NOT weekend' )