Exemplo n.º 1
0
    def test_include(self, tmpdir):
        inc_path = create_file(tmpdir, 'requirements_inc.txt', 'other-package==1.0')
        path = create_file(tmpdir, 'requirements.txt', '-r {0}'.format(inc_path))

        assert read_pip(path) == [
            '-r {0}'.format(inc_path),
            'other-package==1.0',
        ]
Exemplo n.º 2
0
    def test_include(self, tmp_path):
        requirements_inc = tmp_path / "requirements_inc.txt"
        requirements_inc.write_text("other-package==1.0\n")
        requirements = tmp_path / "requirements.txt"
        requirements.write_text(f"-r {requirements_inc}\n")

        assert read_pip(str(requirements)) == [
            f"-r {requirements_inc}",
            "other-package==1.0",
        ]
Exemplo n.º 3
0
 def test_empty(self, tmp_path):
     requirements = tmp_path / "requirements.txt"
     requirements.write_text("\n")
     assert read_pip(str(requirements)) == [""]
Exemplo n.º 4
0
 def test_read(self, tmp_path):
     requirements = tmp_path / "requirements.txt"
     requirements.write_text("package1==1.0\npackage2==1.1\n")
     assert read_pip(
         str(requirements)) == ["package1==1.0", "package2==1.1"]
Exemplo n.º 5
0
 def test_empty(self, tmpdir):
     path = create_file(tmpdir, "requirements.txt", "")
     assert read_pip(path) == [""]
Exemplo n.º 6
0
    def test_include(self, tmpdir):
        inc_path = create_file(tmpdir, "requirements_inc.txt", "other-package==1.0")
        path = create_file(tmpdir, "requirements.txt", "-r {}".format(inc_path))

        assert read_pip(path) == ["-r {}".format(inc_path), "other-package==1.0"]
Exemplo n.º 7
0
 def test_read(self, tmpdir):
     path = create_file(tmpdir, "requirements.txt", "package1==1.0\npackage2==1.1")
     assert read_pip(path) == ["package1==1.0", "package2==1.1"]
Exemplo n.º 8
0
 def test_empty(self, tmpdir):
     path = create_file(tmpdir, 'requirements.txt', '')
     assert read_pip(path) == ['']
Exemplo n.º 9
0
 def test_read(self, tmpdir):
     path = create_file(tmpdir, 'requirements.txt', 'package1==1.0\npackage2==1.1')
     assert read_pip(path) == ['package1==1.0', 'package2==1.1']