https://pulumi.com logo
#python
Title
b

billowy-laptop-45963

04/07/2020, 8:04 PM
I'm creating a library and I have an examples/ directory with examples/example_test.go with
Copy code
Dependencies: []string{
			filepath.Dir(getCwd((t))),
		},
in my integration.ProgramTestOptions{}. When I run the go test it doesn't install the library. There is a setup.py and I tested it with a virtualenv and
pip install .
Is there anything I need to do for the integration test to install my library?
f

faint-table-42725

04/07/2020, 9:25 PM
I would expect that to work. Do you get any error messages around the dependency installation?
also, where does that library live relative to the test you’re running?
is in actually in the same place as
example_test.go
?
b

billowy-laptop-45963

04/08/2020, 11:55 AM
Hi Lee, the structure is:
Copy code
mylib/
  <http://setup.py|setup.py>
  examples/
     go.{mod,sum}
     examples_test.go
     aws/
        acm_simple/
            Pulumi.yaml
            __main__.py
            requirements.txt
I left out a lot of files such as the python files for the library/unit tests.
f

faint-table-42725

04/08/2020, 3:45 PM
I see, so shouldn’t
filepath.Dir(getCwd((t)))
be`filepath.Dir(".."),`? The dependencies should point at where the dep actually lives relative to the cwd of the test. See https://github.com/pulumi/pulumi/blob/4b7eaf86ad8cceacc06639b8c832fc540b12668c/pkg/testing/integration/program.go#L1684 to see how the dependency actually gets installed as part of the integration test