15
0
Files
python-pydicom/python37.patch
Tomáš Chvátal 687e11feef - Update to 1.1.0:
* License is distributed
  * Various speed improvements
- Add patch to work with python 3.7:
  * python37.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydicom?expand=0&rev=7
2018-08-29 12:15:08 +00:00

37 lines
1.2 KiB
Diff

From 3ca897f772e0376e83d32897bebe378742b57ce4 Mon Sep 17 00:00:00 2001
From: mrbean-bremen <mrbean-bremen@users.noreply.github.com>
Date: Sat, 30 Jun 2018 21:49:24 +0200
Subject: [PATCH] Execute date time tests only for the backport to Python 2
(#670)
- added Travis config for Python 3.7
- fixes #668
---
pydicom/tests/test_fixes.py | 5 +++++
2 files changed, 12 insertions(+)
Index: pydicom-1.1.0/pydicom/tests/test_fixes.py
===================================================================
--- pydicom-1.1.0.orig/pydicom/tests/test_fixes.py
+++ pydicom-1.1.0/pydicom/tests/test_fixes.py
@@ -12,7 +12,10 @@ from datetime import datetime
from datetime import timedelta
from datetime import tzinfo
+import pytest
+
import pydicom as pydicom_module
+from pydicom import compat
from pydicom.util.fixes import timezone
pickle_choices = [(pickle, pickle, proto)
@@ -82,6 +85,8 @@ class USTimeZone(tzinfo):
Eastern = USTimeZone(-5, "Eastern", "EST", "EDT")
+@pytest.mark.skipif(not compat.in_py2,
+ reason='only test the backport to Python 2')
class TestTimeZone(unittest.TestCase):
"""Backport of datetime.timezone tests.