summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2019-03-13 11:46:56 +0000
committerJürg Billeter <j@bitron.ch>2019-03-16 07:24:58 +0100
commit101bebaae4d6a8ed80ff987a04ff580690655628 (patch)
treecdd60247e44cf873072540eff6d593a9de4e8ea4
parent3e39d2d2087726a65b4ee967e5eb014b6c450a3f (diff)
downloadbuildstream-101bebaae4d6a8ed80ff987a04ff580690655628.tar.gz
tests/integration/artifact.py: Fix empty directory checks
os.listdir() never returns None.
-rw-r--r--tests/integration/artifact.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/integration/artifact.py b/tests/integration/artifact.py
index a375ee253..35e7f56ae 100644
--- a/tests/integration/artifact.py
+++ b/tests/integration/artifact.py
@@ -121,7 +121,7 @@ def test_cache_buildtrees(cli, tmpdir, datafiles):
elementdigest = share2.has_artifact('test', element_name, cache_key)
with cas_extract_buildtree(elementdigest) as buildtreedir:
assert os.path.isdir(buildtreedir)
- assert os.listdir(buildtreedir) is not None
+ assert os.listdir(buildtreedir)
# Delete the local cached artifacts, and assert that when pulled with --pull-buildtrees
# that it was cached in share2 as expected with a populated buildtree dir
@@ -131,7 +131,7 @@ def test_cache_buildtrees(cli, tmpdir, datafiles):
assert element_name in result.get_pulled_elements()
with cas_extract_buildtree(elementdigest) as buildtreedir:
assert os.path.isdir(buildtreedir)
- assert os.listdir(buildtreedir) is not None
+ assert os.listdir(buildtreedir)
shutil.rmtree(os.path.join(str(tmpdir), 'cas'))
# Clarify that the user config option for cache-buildtrees works as the cli