summaryrefslogtreecommitdiff
path: root/tests/sources/previous_source_access.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sources/previous_source_access.py')
-rw-r--r--tests/sources/previous_source_access.py31
1 files changed, 10 insertions, 21 deletions
diff --git a/tests/sources/previous_source_access.py b/tests/sources/previous_source_access.py
index 750b94381..fadf6710c 100644
--- a/tests/sources/previous_source_access.py
+++ b/tests/sources/previous_source_access.py
@@ -7,10 +7,7 @@ import pytest
from buildstream import _yaml
from buildstream.testing import cli # pylint: disable=unused-import
-DATA_DIR = os.path.join(
- os.path.dirname(os.path.realpath(__file__)),
- 'previous_source_access'
-)
+DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "previous_source_access")
##################################################################
@@ -29,30 +26,22 @@ def test_custom_transform_source(cli, datafiles):
_yaml.roundtrip_dump(project_config, project_config_path)
# Ensure we can track
- result = cli.run(project=project, args=[
- 'source', 'track', 'target.bst'
- ])
+ result = cli.run(project=project, args=["source", "track", "target.bst"])
result.assert_success()
# Ensure we can fetch
- result = cli.run(project=project, args=[
- 'source', 'fetch', 'target.bst'
- ])
+ result = cli.run(project=project, args=["source", "fetch", "target.bst"])
result.assert_success()
# Ensure we get correct output from foo_transform
- cli.run(project=project, args=[
- 'build', 'target.bst'
- ])
- destpath = os.path.join(cli.directory, 'checkout')
- result = cli.run(project=project, args=[
- 'artifact', 'checkout', 'target.bst', '--directory', destpath
- ])
+ cli.run(project=project, args=["build", "target.bst"])
+ destpath = os.path.join(cli.directory, "checkout")
+ result = cli.run(project=project, args=["artifact", "checkout", "target.bst", "--directory", destpath])
result.assert_success()
# Assert that files from both sources exist, and that they have
# the same content
- assert os.path.exists(os.path.join(destpath, 'file'))
- assert os.path.exists(os.path.join(destpath, 'filetransform'))
- with open(os.path.join(destpath, 'file')) as file1:
- with open(os.path.join(destpath, 'filetransform')) as file2:
+ assert os.path.exists(os.path.join(destpath, "file"))
+ assert os.path.exists(os.path.join(destpath, "filetransform"))
+ with open(os.path.join(destpath, "file")) as file1:
+ with open(os.path.join(destpath, "filetransform")) as file2:
assert file1.read() == file2.read()