forked from pool/python-pytest-profiling
- Less globs in %files. - Clean up Python 2 leftovers. - Edit python-pytest-profiling-no-six.patch to also drop the install_requires. - Add patch fix-mock-call.patch: * Correct mocking call to be assert_called_with(). OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-profiling?expand=0&rev=9
53 lines
1.7 KiB
Diff
53 lines
1.7 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
|
|
|
|
Index: pytest-profiling-1.7.0/setup.py
|
|
===================================================================
|
|
--- pytest-profiling-1.7.0.orig/setup.py
|
|
+++ pytest-profiling-1.7.0/setup.py
|
|
@@ -22,8 +22,7 @@ classifiers = [
|
|
'Programming Language :: Python :: 3.7',
|
|
]
|
|
|
|
-install_requires = ['six',
|
|
- 'pytest',
|
|
+install_requires = ['pytest',
|
|
'gprof2dot',
|
|
]
|
|
|