Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-pyRFC3339 for openSUSE:Factory checked in at 2021-09-20 23:33:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pyRFC3339 (Old) and /work/SRC/openSUSE:Factory/.python-pyRFC3339.new.1899 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pyRFC3339" Mon Sep 20 23:33:10 2021 rev:5 rq:920218 version:1.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pyRFC3339/python-pyRFC3339.changes 2021-06-04 00:34:18.256999289 +0200 +++ /work/SRC/openSUSE:Factory/.python-pyRFC3339.new.1899/python-pyRFC3339.changes 2021-09-20 23:36:03.843389344 +0200 @@ -1,0 +2,6 @@ +Mon Sep 20 02:09:22 UTC 2021 - Steve Kowalik <steven.kowa...@suse.com> + +- Add switch-to-pytest.patch + * Use assert and pytest rather than nose. + +------------------------------------------------------------------- New: ---- switch-to-pytest.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pyRFC3339.spec ++++++ --- /var/tmp/diff_new_pack.HCxv5O/_old 2021-09-20 23:36:04.247389843 +0200 +++ /var/tmp/diff_new_pack.HCxv5O/_new 2021-09-20 23:36:04.251389848 +0200 @@ -25,7 +25,7 @@ Group: Development/Languages/Python URL: https://github.com/kurtraschke/pyRFC3339 Source: https://github.com/kurtraschke/pyRFC3339/archive/refs/tags/v1.1.tar.gz#/pyRFC3339-%{version}.tar.gz -BuildRequires: %{python_module nose} +Patch0: switch-to-pytest.patch BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytz} BuildRequires: %{python_module setuptools} @@ -40,6 +40,7 @@ %prep %setup -q -n pyRFC3339-%{version} +%autopatch -p1 %build %python_build ++++++ switch-to-pytest.patch ++++++ Index: pyRFC3339-1.1/pyrfc3339/tests/tests.py =================================================================== --- pyRFC3339-1.1.orig/pyrfc3339/tests/tests.py +++ pyRFC3339-1.1/pyrfc3339/tests/tests.py @@ -10,7 +10,7 @@ from pyrfc3339 import generate, parse from pyrfc3339.utils import timezone import pytz -from nose.tools import eq_, raises +from pytest import raises class TestCore(): @@ -24,8 +24,8 @@ class TestCore(): Test rounding of timezone values to the nearest second. ''' - eq_(timezone(5429), '+01:30') - eq_(timezone(5431), '+01:31') + assert timezone(5429) == '+01:30' + assert timezone(5431) == '+01:31' def test_zero_offset(self): ''' @@ -34,11 +34,11 @@ class TestCore(): ''' timestamp = '2009-01-01T10:02:03+00:00' dt = parse(timestamp) - eq_(dt.tzinfo, pytz.utc) + assert dt.tzinfo == pytz.utc timestamp = '2009-01-01T10:02:03-00:00' dt = parse(timestamp) - eq_(dt.tzinfo, pytz.utc) + assert dt.tzinfo == pytz.utc def test_deepcopy(self): ''' @@ -56,7 +56,7 @@ class TestCore(): ''' timestamp = '2009-01-01T10:02:03.25Z' dt = parse(timestamp) - eq_(dt.microsecond, 250000) + assert dt.microsecond == 250000 def test_generate_microseconds(self): ''' @@ -65,7 +65,7 @@ class TestCore(): ''' dt = datetime(2009, 1, 1, 10, 2, 3, 500000, pytz.utc) timestamp = generate(dt, microseconds=True) - eq_(timestamp, '2009-01-01T10:02:03.500000Z') + assert timestamp == '2009-01-01T10:02:03.500000Z' def test_mixed_case(self): ''' @@ -76,7 +76,7 @@ class TestCore(): dt1 = parse('2009-01-01t10:01:02z') dt2 = datetime(2009, 1, 1, 10, 1, 2, tzinfo=pytz.utc) - eq_(dt1, dt2) + assert dt1 == dt2 def test_parse_naive_utc(self): ''' @@ -84,15 +84,15 @@ class TestCore(): ''' dt1 = parse('2009-01-01T10:01:02Z', produce_naive=True) - eq_(dt1.tzinfo, None) + assert dt1.tzinfo is None - @raises(ValueError) def test_parse_naive_local(self): ''' Test that parsing a local timestamp to a naive datetime fails. ''' - parse('2009-01-01T10:01:02-04:00', produce_naive=True) + with raises(ValueError): + parse('2009-01-01T10:01:02-04:00', produce_naive=True) def test_generate_utc_parse_utc(self): ''' @@ -103,7 +103,7 @@ class TestCore(): dt1 = dt1.replace(tzinfo=pytz.utc) dt2 = parse(generate(dt1, microseconds=True)) - eq_(dt1, dt2) + assert dt1 == dt2 def test_generate_local_parse_local(self): ''' @@ -113,7 +113,7 @@ class TestCore(): eastern = pytz.timezone('US/Eastern') dt1 = eastern.localize(datetime.utcnow()) dt2 = parse(generate(dt1, utc=False, microseconds=True), utc=False) - eq_(dt1, dt2) + assert dt1 == dt2 def test_generate_local_parse_utc(self): ''' @@ -123,7 +123,7 @@ class TestCore(): eastern = pytz.timezone('US/Eastern') dt1 = eastern.localize(datetime.utcnow()) dt2 = parse(generate(dt1, utc=False, microseconds=True)) - eq_(dt1, dt2) + assert dt1 == dt2 class TestExhaustiveRoundtrip(): @@ -150,7 +150,7 @@ class TestExhaustiveRoundtrip(): dt1 = tzinfo.localize(datetime.utcnow()) timestamp = generate(dt1, utc=False, microseconds=True) dt2 = parse(timestamp, utc=False) - eq_(dt1, dt2) + assert dt1 == dt2 def test_utc_roundtrip(self): for tz_name in pytz.all_timezones: @@ -167,4 +167,4 @@ class TestExhaustiveRoundtrip(): dt1 = tzinfo.localize(datetime.utcnow()) timestamp = generate(dt1, utc=False, microseconds=True) dt2 = parse(timestamp) - eq_(dt1, dt2) + assert dt1 == dt2