mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-04 14:30:30 +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
|
|
@ -830,8 +830,17 @@ class UpdateTest(unittest.TestCase):
|
|||
# yaml.add_representer(fdroidserver.metadata.Build, _build_yaml_representer)
|
||||
# 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:
|
||||
from_yaml = yaml.load(f, Loader=FullLoader)
|
||||
from_yaml = yaml.load(f, Loader=TestLoader)
|
||||
self.maxDiff = None
|
||||
self.assertEqual(apk, from_yaml)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue