Skip to content

Commit 06be964

Browse files
committed
Fixed test_bootstrap.py
1 parent 532a1e7 commit 06be964

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

tests/test_bootstrap.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from pythonforandroid.bootstrap import (
88
_cmp_bootstraps_by_priority, Bootstrap, expand_dependencies,
99
)
10-
from pythonforandroid.distribution import Distribution
10+
from pythonforandroid.distribution import Distribution, generate_dist_folder_name
1111
from pythonforandroid.recipe import Recipe
1212
from pythonforandroid.archs import ArchARMv7_a
1313
from pythonforandroid.build import Context
@@ -22,6 +22,8 @@ class BaseClassSetupBootstrap(object):
2222
`setUp` and `tearDown` methods.
2323
"""
2424

25+
TEST_ARCH='armeabi-v7a'
26+
2527
def setUp(self):
2628
self.ctx = Context()
2729
self.ctx.ndk_api = 21
@@ -43,7 +45,9 @@ def setUp_distribution_with_bootstrap(self, bs):
4345
"""
4446
self.ctx.bootstrap = bs
4547
self.ctx.bootstrap.distribution = Distribution.get_distribution(
46-
self.ctx, name="test_prj", recipes=["python3", "kivy"]
48+
self.ctx, name="test_prj",
49+
recipes=["python3", "kivy"],
50+
arch_name=self.TEST_ARCH,
4751
)
4852

4953
def tearDown(self):
@@ -79,7 +83,9 @@ def test_attributes(self):
7983

8084
# test dist_dir success
8185
self.setUp_distribution_with_bootstrap(bs)
82-
self.assertTrue(bs.dist_dir.endswith("dists/test_prj"))
86+
expected_folder_name = generate_dist_folder_name('test_prj', [self.TEST_ARCH])
87+
self.assertTrue(
88+
bs.dist_dir.endswith(f"dists/{expected_folder_name}"))
8389

8490
def test_build_dist_dirs(self):
8591
"""A test which will initialize a bootstrap and will check if the

0 commit comments

Comments
 (0)