diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2021-05-31 19:46:09 +0200 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2021-06-03 10:23:27 -0700 |
commit | 95b70bcb97afa9177645e4926afdf3792fb73eb5 (patch) | |
tree | dea7c5ec83a7b2a90b533f58d50ad88b8961bc8f /run_unittests.py | |
parent | 201dc6422683858f9656c8b572530237c810feef (diff) | |
download | meson-95b70bcb97afa9177645e4926afdf3792fb73eb5.zip meson-95b70bcb97afa9177645e4926afdf3792fb73eb5.tar.gz meson-95b70bcb97afa9177645e4926afdf3792fb73eb5.tar.bz2 |
deps: Split dependencies.base
Split the Factory and dependency classes out
of the base.py script to improve maintainability.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/run_unittests.py b/run_unittests.py index 3a98368..e278675 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -44,6 +44,7 @@ import typing as T import mesonbuild.mlog import mesonbuild.depfile import mesonbuild.dependencies.base +import mesonbuild.dependencies.factory import mesonbuild.compilers import mesonbuild.envconfig import mesonbuild.environment @@ -1251,19 +1252,20 @@ class InternalTests(unittest.TestCase): def test_dependency_factory_order(self): b = mesonbuild.dependencies.base + F = mesonbuild.dependencies.factory with tempfile.TemporaryDirectory() as tmpdir: with chdir(tmpdir): env = get_fake_env() env.scratch_dir = tmpdir - f = b.DependencyFactory( + f = F.DependencyFactory( 'test_dep', methods=[b.DependencyMethods.PKGCONFIG, b.DependencyMethods.CMAKE] ) actual = [m() for m in f(env, MachineChoice.HOST, {'required': False})] self.assertListEqual([m.type_name for m in actual], ['pkgconfig', 'cmake']) - f = b.DependencyFactory( + f = F.DependencyFactory( 'test_dep', methods=[b.DependencyMethods.CMAKE, b.DependencyMethods.PKGCONFIG] ) |