Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(aws-cdk): cdk init sample-app pytest fails on name with '-' #15938

Closed
Pearcekieser opened this issue Aug 8, 2021 · 1 comment · Fixed by #15939
Closed

(aws-cdk): cdk init sample-app pytest fails on name with '-' #15938

Pearcekieser opened this issue Aug 8, 2021 · 1 comment · Fixed by #15939
Labels
bug This issue is a bug. effort/small Small work item – less than a day of effort p1 package/tools Related to AWS CDK Tools or CLI

Comments

@Pearcekieser
Copy link
Contributor

On windows I ran cdk init in a directory called "aws-data-pipeline". After codegen, I created the virtual env, enabled the venv, installed the dependencies, cdk commands were working (ex. cdk synth, info and diff), but pytest failed.

E     File "C:\Users\<...>\aws-data-pipeline\tests\unit\test_aws_data_pipe
E       from aws-data-pipeline.aws_data_pipeline_stack import AwsDataPipelineStack
E               ^
E   SyntaxError: invalid syntax

Reproduction Steps

mkdir aws-data-pipeline
cd aws-data-pipeline
cdk init sample-app --language python
python3 -m venv .venv

activate the venv I ran .venv\Scripts\activate.bat bc windows

pip install -r requirements.txt
pytest

What did you expect to happen?

expected pytest to pass

What actually happened?

E     File "C:\Users\<...>\aws-data-pipeline\tests\unit\test_aws_data_pipe
E       from aws-data-pipeline.aws_data_pipeline_stack import AwsDataPipelineStack
E               ^
E   SyntaxError: invalid syntax

Environment

  • CDK CLI Version : 1.117.0 (build 0047c98)
  • Framework Version:
  • Node.js Version: v14.17.4
  • OS : windows10
  • Language (Version): Python 3.7.3

Other

I will pr a fix shortly. I could use some help getting the tests working though


This is 🐛 Bug Report

@Pearcekieser Pearcekieser added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Aug 8, 2021
Pearcekieser added a commit to Pearcekieser/aws-cdk that referenced this issue Aug 8, 2021
@peterwoodworth peterwoodworth added the package/tools Related to AWS CDK Tools or CLI label Aug 11, 2021
@rix0rrr rix0rrr added effort/small Small work item – less than a day of effort p1 and removed needs-triage This issue or PR still needs to be triaged. labels Aug 19, 2021
@rix0rrr rix0rrr removed their assignment Aug 19, 2021
@mergify mergify bot closed this as completed in #15939 Aug 19, 2021
mergify bot pushed a commit that referenced this issue Aug 19, 2021
…15939)

fixes #15938

Pytest error after init sample-app on directory "aws-data-pipeline"

```
E     File "C:\Users\<...>\aws-data-pipeline\tests\unit\test_aws_data_pipe
E       from aws-data-pipeline.aws_data_pipeline_stack import AwsDataPipelineStack
E               ^
E   SyntaxError: invalid syntax
```

See #15938 for detials

I was having trouble getting the aws-cdk build and tests running in my dev env.  I think its some issues trying to build the code on windows.  Do you have any recommendations on how to best add a test for this change?

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

smguggen pushed a commit to smguggen/aws-cdk that referenced this issue Aug 24, 2021
…ws#15939)

fixes aws#15938

Pytest error after init sample-app on directory "aws-data-pipeline"

```
E     File "C:\Users\<...>\aws-data-pipeline\tests\unit\test_aws_data_pipe
E       from aws-data-pipeline.aws_data_pipeline_stack import AwsDataPipelineStack
E               ^
E   SyntaxError: invalid syntax
```

See aws#15938 for detials

I was having trouble getting the aws-cdk build and tests running in my dev env.  I think its some issues trying to build the code on windows.  Do you have any recommendations on how to best add a test for this change?

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
hollanddd pushed a commit to hollanddd/aws-cdk that referenced this issue Aug 26, 2021
…ws#15939)

fixes aws#15938

Pytest error after init sample-app on directory "aws-data-pipeline"

```
E     File "C:\Users\<...>\aws-data-pipeline\tests\unit\test_aws_data_pipe
E       from aws-data-pipeline.aws_data_pipeline_stack import AwsDataPipelineStack
E               ^
E   SyntaxError: invalid syntax
```

See aws#15938 for detials

I was having trouble getting the aws-cdk build and tests running in my dev env.  I think its some issues trying to build the code on windows.  Do you have any recommendations on how to best add a test for this change?

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this issue Sep 6, 2021
…ws#15939)

fixes aws#15938

Pytest error after init sample-app on directory "aws-data-pipeline"

```
E     File "C:\Users\<...>\aws-data-pipeline\tests\unit\test_aws_data_pipe
E       from aws-data-pipeline.aws_data_pipeline_stack import AwsDataPipelineStack
E               ^
E   SyntaxError: invalid syntax
```

See aws#15938 for detials

I was having trouble getting the aws-cdk build and tests running in my dev env.  I think its some issues trying to build the code on windows.  Do you have any recommendations on how to best add a test for this change?

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
david-doyle-as24 pushed a commit to david-doyle-as24/aws-cdk that referenced this issue Sep 7, 2021
…ws#15939)

fixes aws#15938

Pytest error after init sample-app on directory "aws-data-pipeline"

```
E     File "C:\Users\<...>\aws-data-pipeline\tests\unit\test_aws_data_pipe
E       from aws-data-pipeline.aws_data_pipeline_stack import AwsDataPipelineStack
E               ^
E   SyntaxError: invalid syntax
```

See aws#15938 for detials

I was having trouble getting the aws-cdk build and tests running in my dev env.  I think its some issues trying to build the code on windows.  Do you have any recommendations on how to best add a test for this change?

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. effort/small Small work item – less than a day of effort p1 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants