|
6 | 6 | from .common import BuiltinTestCase |
7 | 7 | from .. import * |
8 | 8 |
|
9 | | -from bfg9000 import file_types, options as opts |
10 | | -from bfg9000.build_inputs import BuildInputs |
| 9 | +from bfg9000 import file_types |
11 | 10 | from bfg9000.builtins import builtin, packages, project # noqa: F401 |
12 | | -from bfg9000.exceptions import PackageResolutionError |
13 | 11 | from bfg9000.iterutils import first |
14 | | -from bfg9000.packages import CommonPackage, Framework |
15 | | -from bfg9000.path import abspath, Path, Root |
| 12 | +from bfg9000.path import abspath |
16 | 13 | from bfg9000.versioning import SpecifierSet, Version |
17 | 14 |
|
18 | 15 |
|
@@ -66,47 +63,6 @@ def mock_execute_msvc(args, **kwargs): |
66 | 63 | return mock_execute_common(args, **kwargs) |
67 | 64 |
|
68 | 65 |
|
69 | | -class TestFramework(TestCase): |
70 | | - def _make_context(self, env): |
71 | | - build = BuildInputs(env, Path('build.bfg', Root.srcdir)) |
72 | | - return builtin.BuildContext(env, build, None) |
73 | | - |
74 | | - def test_framework(self): |
75 | | - env = make_env('macos') |
76 | | - context = self._make_context(env) |
77 | | - |
78 | | - self.assertEqual( |
79 | | - context['framework']('name'), |
80 | | - CommonPackage('name', format=env.target_platform.object_format, |
81 | | - link_options=opts.option_list(opts.lib( |
82 | | - Framework('name') |
83 | | - ))) |
84 | | - ) |
85 | | - |
86 | | - def test_framework_suffix(self): |
87 | | - env = make_env('macos') |
88 | | - context = self._make_context(env) |
89 | | - |
90 | | - self.assertEqual( |
91 | | - context['framework']('name', 'suffix'), |
92 | | - CommonPackage('name,suffix', |
93 | | - format=env.target_platform.object_format, |
94 | | - link_options=opts.option_list(opts.lib( |
95 | | - Framework('name', 'suffix') |
96 | | - ))) |
97 | | - ) |
98 | | - |
99 | | - def test_frameworks_unsupported(self): |
100 | | - env = make_env('linux') |
101 | | - context = self._make_context(env) |
102 | | - |
103 | | - with self.assertRaises(PackageResolutionError): |
104 | | - context['framework']('name') |
105 | | - |
106 | | - with self.assertRaises(PackageResolutionError): |
107 | | - context['framework']('name', 'suffix') |
108 | | - |
109 | | - |
110 | 66 | class TestPackageCc(BuiltinTestCase): |
111 | 67 | mock_execute = staticmethod(mock_execute_cc) |
112 | 68 | mock_platform = 'linux' |
|
0 commit comments