Skip to content

Commit

Permalink
Make src/main/python creation test more specific
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsmith committed Aug 13, 2023
1 parent 096049e commit 26fb1f6
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions product/gradle-plugin/src/test/integration/test_gradle_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,24 @@ def post_check(self, run, apk_dir, kwargs):
class Basic(GradleTestCase):
def test_base(self):
run = self.RunGradle("base", run=False)
src_dir = f"{run.project_dir}/app/src/main/python"
assert not exists(src_dir), src_dir
src_dir = f"{run.project_dir}/app/src"
self.assertEqual(
list(os.walk(src_dir)),
[
(src_dir, ["main"], []),
(f"{src_dir}/main", [], ["AndroidManifest.xml"]),
])

# Main source directory should be created automatically, to invite the user to
# put things in it.
run.rerun()
assert exists(src_dir), src_dir
self.assertEqual(
list(os.walk(src_dir)),
[
(src_dir, ["main"], []),
(f"{src_dir}/main", ["python"], ["AndroidManifest.xml"]),
(f"{src_dir}/main/python", [], []),
])

def test_kwargs_wrapper(self):
with self.assertRaisesRegex(AssertionError, "{'unused'} is not false"):
Expand Down

0 comments on commit 26fb1f6

Please sign in to comment.