17
0
Files
python-pytest-profiling/python-pytest-profiling-no-six.patch
Daniel Garcia 605ba2a4ce Accepting request 1041386 from home:pgajdos:python
- do not require mock
- use -p1 as quilt refresh does not like higher ones
- modified patches
  % pytest-fixtures-pr171-remove-mock.patch (refreshed)
- added patches
  fix https://github.com/man-group/pytest-plugins/issues/209
  + python-pytest-profiling-no-six.patch

OBS-URL: https://build.opensuse.org/request/show/1041386
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-profiling?expand=0&rev=7
2022-12-09 10:51:24 +00:00

39 lines
1.3 KiB
Diff

Index: pytest-profiling-1.7.0/pytest_profiling.py
===================================================================
--- pytest-profiling-1.7.0.orig/pytest_profiling.py
+++ pytest-profiling-1.7.0/pytest_profiling.py
@@ -10,7 +10,6 @@ import pipes
import errno
from hashlib import md5
-import six
import pytest
LARGE_FILENAME_HASH_LEN = 8
@@ -18,7 +17,7 @@ LARGE_FILENAME_HASH_LEN = 8
def clean_filename(s):
forbidden_chars = set('/?<>\:*|"')
- return six.text_type("".join(c if c not in forbidden_chars and ord(c) < 127 else '_'
+ return str("".join(c if c not in forbidden_chars and ord(c) < 127 else '_'
for c in s))
Index: pytest-profiling-1.7.0/tests/unit/test_profile.py
===================================================================
--- pytest-profiling-1.7.0.orig/tests/unit/test_profile.py
+++ pytest-profiling-1.7.0/tests/unit/test_profile.py
@@ -2,10 +2,10 @@
# the top-level code in pytest_profiling will be omitted from
# coverage, so force it to be reloaded within this test unit under coverage
-from six.moves import reload_module # @UnresolvedImport
+from importlib import reload # @UnresolvedImport
import pytest_profiling
-reload_module(pytest_profiling)
+reload(pytest_profiling)
from pytest_profiling import Profiling, pytest_addoption, pytest_configure