mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-15 07:22:29 +03:00
tests: run pip tests using fdroid that pip installed
This commit is contained in:
parent
f6b5f74ec6
commit
aebf70a763
2 changed files with 11 additions and 2 deletions
|
@ -129,7 +129,7 @@ ubuntu_bionic_pip:
|
||||||
- $pip install dist/fdroidserver-*.tar.gz
|
- $pip install dist/fdroidserver-*.tar.gz
|
||||||
- tar xzf dist/fdroidserver-*.tar.gz
|
- tar xzf dist/fdroidserver-*.tar.gz
|
||||||
- cd fdroidserver-*
|
- cd fdroidserver-*
|
||||||
- ./tests/run-tests
|
- fdroid=`which fdroid` ./tests/run-tests
|
||||||
|
|
||||||
# test install process on a bleeding edge distro with pip
|
# test install process on a bleeding edge distro with pip
|
||||||
arch_pip_install:
|
arch_pip_install:
|
||||||
|
|
|
@ -830,8 +830,17 @@ class UpdateTest(unittest.TestCase):
|
||||||
# yaml.add_representer(fdroidserver.metadata.Build, _build_yaml_representer)
|
# yaml.add_representer(fdroidserver.metadata.Build, _build_yaml_representer)
|
||||||
# yaml.dump(apk, f, default_flow_style=False)
|
# yaml.dump(apk, f, default_flow_style=False)
|
||||||
|
|
||||||
|
# CFullLoader doesn't always work
|
||||||
|
# https://github.com/yaml/pyyaml/issues/266#issuecomment-559116876
|
||||||
|
TestLoader = FullLoader
|
||||||
|
try:
|
||||||
|
testyaml = '- !!python/object/new:fdroidserver.update.UsesPermission\n - test\n - null'
|
||||||
|
from_yaml = yaml.load(testyaml, Loader=TestLoader)
|
||||||
|
except yaml.constructor.ConstructorError:
|
||||||
|
from yaml import UnsafeLoader as TestLoader
|
||||||
|
|
||||||
with open(savepath, 'r') as f:
|
with open(savepath, 'r') as f:
|
||||||
from_yaml = yaml.load(f, Loader=FullLoader)
|
from_yaml = yaml.load(f, Loader=TestLoader)
|
||||||
self.maxDiff = None
|
self.maxDiff = None
|
||||||
self.assertEqual(apk, from_yaml)
|
self.assertEqual(apk, from_yaml)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue