aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/tests
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-01-05 08:14:27 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-01-05 12:38:01 +0100
commit88ab82b283fcb7e5805819ea18dc8d22b035b7bf (patch)
treee995cfa6e9f5351f75d7cb11f87e8b3a5db83d40 /sources/pyside2/tests
parent2a8675cdbcc3e064069b6f1878fe1c1ce736653c (diff)
parent939150289d13b40882f7247d05213a0418076810 (diff)
Merge remote-tracking branch 'origin/5.6' into 5.9
Diffstat (limited to 'sources/pyside2/tests')
-rw-r--r--sources/pyside2/tests/registry/existence_test.py6
-rw-r--r--sources/pyside2/tests/registry/init_platform.py6
2 files changed, 7 insertions, 5 deletions
diff --git a/sources/pyside2/tests/registry/existence_test.py b/sources/pyside2/tests/registry/existence_test.py
index 8f3c568a3..3c5b7e545 100644
--- a/sources/pyside2/tests/registry/existence_test.py
+++ b/sources/pyside2/tests/registry/existence_test.py
@@ -131,16 +131,16 @@ if not have_refmodule and is_ci and qtVersion()[:2] in tested_versions:
"""
generate_all()
sys.stderr.flush()
- print("BEGIN_FILE", refPath, file=sys.stderr)
+ print("BEGIN_FILE", shortpath, file=sys.stderr)
with open(refPath) as f:
print(f.read(), file=sys.stderr)
- print("END_FILE", refPath, file=sys.stderr)
+ print("END_FILE", shortpath, file=sys.stderr)
sys.stderr.flush()
raise RuntimeError(dedent("""
{line}
** This is the initial call. You should check this file in:
** {}
- **""").format(refPath, line=79 * "*"))
+ **""").format(shortpath, line=79 * "*"))
if __name__ == '__main__':
unittest.main()
diff --git a/sources/pyside2/tests/registry/init_platform.py b/sources/pyside2/tests/registry/init_platform.py
index ffe6e22fc..a8e692d98 100644
--- a/sources/pyside2/tests/registry/init_platform.py
+++ b/sources/pyside2/tests/registry/init_platform.py
@@ -229,7 +229,9 @@ def enum_all():
return ret
def generate_all():
- with open(refPath(), "w") as outfile, open(sourcepath) as f:
+ refPath = getRefPath()
+ module = os.path.basename(os.path.splitext(refPath)[0])
+ with open(refPath, "w") as outfile, open(sourcepath) as f:
fmt = Formatter(outfile)
enu = SimplifyingEnumerator(fmt)
lines = f.readlines()
@@ -254,7 +256,7 @@ def generate_all():
def __main__():
print("+++ generating {}. You should probably check this file in."
- .format(refpath))
+ .format(getRefPath()))
generate_all()
if __name__ == "__main__":