14
0
Files
python-xmlschema/location_testing_script.patch
Matej Cepl 89a32e9a2c - Add patches
- factory_tests.patch rename tests_factory to tests so it is
    not recognized by pytest
  - remove_shebang.patch just cleaning superfluous shebang
  - location_testing_script.patch use actual Python executable

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-xmlschema?expand=0&rev=21
2020-11-09 19:32:34 +00:00

24 lines
798 B
Diff

---
tests/test_etree_import.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/tests/test_etree_import.py
+++ b/tests/test_etree_import.py
@@ -15,7 +15,6 @@ import importlib
import subprocess
import platform
-
def is_element_tree_imported():
return '_elementtree' in sys.modules or 'xml.etree.ElementTree' in sys.modules
@@ -42,7 +41,7 @@ class TestElementTreeImport(unittest.Tes
def test_element_tree_import_script(self):
test_dir = os.path.dirname(__file__) or '.'
- cmd = [os.path.join(test_dir, 'check_etree_import.py')]
+ cmd = [sys.executable, os.path.join(test_dir, 'check_etree_import.py')]
process = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stderr = process.stderr.decode('utf-8')