blob: c3f339e2db0d7a55e471196d5a4d0e6c02d08683 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# Copyright 2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
from __future__ import unicode_literals
import sys
from portage.dep.soname.SonameAtom import SonameAtom
from portage.tests import TestCase
from portage.util.futures import asyncio
from portage.util.futures.executor.fork import ForkExecutor
class TestSonameAtomPickle(TestCase):
_ALL_PROVIDES = frozenset([SonameAtom('x86_64', 'libc.so.6')])
def test_soname_atom_pickle(self):
loop = asyncio._wrap_loop()
with ForkExecutor(loop=loop) as executor:
result = loop.run_until_complete(loop.run_in_executor(executor, self._get_all_provides))
self.assertEqual(self._ALL_PROVIDES, result)
@classmethod
def _get_all_provides(cls):
return cls._ALL_PROVIDES
|