Skip to content

Commit

Permalink
Removed python2 style inherit from object.
Browse files Browse the repository at this point in the history
  • Loading branch information
simlist committed Jun 4, 2020
1 parent bc39800 commit 5199932
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
14 changes: 7 additions & 7 deletions tests/test_dates.py
Expand Up @@ -24,7 +24,7 @@ def datetypeslist():
return datetypes


class TestClassesSanity(object):
class TestClassesSanity:
def test_greg_sanity(self):
for i in range(347998, 2460000, 117):
jd = dates.JulianDay(i)
Expand All @@ -41,7 +41,7 @@ def test_heb_sanity(self):
assert jd.day == conf.day


class TestClassesConversion(object):
class TestClassesConversion:
def test_from_greg(self):
for date in KNOWN_VALUES:
heb = dates.GregorianDate(*date).to_heb().tuple()
Expand All @@ -58,7 +58,7 @@ def setup(scope='module'):
deltas = [0, 1, 29, 73, 1004]
return {'caltypes': caltypes, 'deltas': deltas}

class TestOperators(object):
class TestOperators:

def test_add(self, setup):
for cal in setup['caltypes']:
Expand Down Expand Up @@ -90,7 +90,7 @@ def test_min_date(self, setup):
assert delta == difference


class TestComparisons(object):
class TestComparisons:
"""In ComparisonTests, comparisons are tested.
Every function tests one test case comparing a date from each
Expand Down Expand Up @@ -131,7 +131,7 @@ def test_eq(self, setup):
assert comp(today, today2) is False


class TestErrors(object):
class TestErrors:

def test_too_low_heb(self):
with pytest.raises(ValueError):
Expand Down Expand Up @@ -173,7 +173,7 @@ def test_GregorianDate_errors(self):
with pytest.raises(ValueError):
GregorianDate(*datetuple)

class TestReprandStr(object):
class TestReprandStr:
def test_repr(self, datetypeslist):
for datetype in datetypeslist:
assert eval(repr(datetype.today())) == datetype.today()
Expand All @@ -195,7 +195,7 @@ def test_weekday():
assert HebrewDate(5777, 6, 1).weekday() == 4
assert JulianDay(2458342.5).weekday() == 1

class TestMixinMethods():
class TestMixinMethods:

@pytest.fixture
def date(self):
Expand Down
9 changes: 4 additions & 5 deletions tests/test_hebrewcal.py
Expand Up @@ -5,7 +5,7 @@
from pyluach.hebrewcal import Year, Month, holiday


class TestYear(object):
class TestYear:

def test_repryear(self):
year = Year(5777)
Expand Down Expand Up @@ -84,7 +84,7 @@ def test_years_le(self, years):
assert years[1] <= years[2]
assert (years[2] <= years[1]) is False

class TestMonth(object):
class TestMonth:

def test_reprmonth(self):
month = Month(5777, 10)
Expand Down Expand Up @@ -191,8 +191,7 @@ def rest_month_ne(self, months):
assert months[3] != months[1]
assert (copy(months[1]) != months[1]) is False


class TestHoliday(object):
class TestHoliday:

def test_roshhashana(self):
roshhashana = dates.HebrewDate(5779, 7, 1)
Expand Down Expand Up @@ -256,7 +255,7 @@ def test_shavuos(self):
def test_tubeav(self):
assert holiday(dates.HebrewDate(5779, 5, 15)) == "Tu B'av"

class TestFasts(object):
class TestFasts:

def test_gedalia(self):
assert holiday(dates.HebrewDate(5779, 7, 3)) == 'Tzom Gedalia'
Expand Down
2 changes: 1 addition & 1 deletion tests/test_parshios.py
Expand Up @@ -16,7 +16,7 @@
}


class TestGetParsha(object):
class TestGetParsha:

def test_getparsha(self):
for key in KNOWN_VALUES:
Expand Down

0 comments on commit 5199932

Please sign in to comment.