We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96d0461 commit 38292c4Copy full SHA for 38292c4
tests/test_parser.py
@@ -1517,3 +1517,13 @@ def test_alt_dockerfile_names(self, tmpdir):
1517
1518
validate = DockerfileParser(path=tmpdir, dockerfile_filename="Containerfile")
1519
assert validate.baseimage == out.baseimage
1520
+
1521
+ def test_dockerfile_path_compatibility(self, tmpdir):
1522
+ parser = DockerfileParser(path=tmpdir)
1523
+ assert str(parser.dockerfile) == parser.dockerfile_path
1524
+ assert parser.dockerfile == tmpdir / "Dockerfile"
1525
1526
+ with (tmpdir / "nothing").open("w+") as testfile:
1527
+ nullparser = DockerfileParser(fileobj=testfile)
1528
+ assert nullparser.dockerfile is None
1529
+ assert nullparser.dockerfile_path is None
0 commit comments