Skip to content

Commit

Permalink
add --namespace packages to package root tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hauntsaninja committed Oct 23, 2020
1 parent bb403c2 commit d88a45c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test-data/unit/cmdline.test
Original file line number Diff line number Diff line change
Expand Up @@ -934,27 +934,27 @@ emarg/foo.py:1: error: Name 'fail' is not defined
emarg/hatch/villip/mankangulisk.py:1: error: Name 'fail' is not defined

[case testPackageRootEmpty]
# cmd: mypy --package-root= a/b/c.py main.py
# cmd: mypy --namespace-packages --package-root= a/b/c.py main.py
[file a/b/c.py]
[file main.py]
import a.b.c

[case testPackageRootNonEmpty]
# cmd: mypy --package-root=a/ a/b/c.py main.py
# cmd: mypy --namespace-packages --package-root=a/ a/b/c.py main.py
[file a/b/c.py]
[file main.py]
import b.c

[case testPackageRootMultiple1]
# cmd: mypy --package-root=. --package-root=a a/b/c.py d.py main.py
# cmd: mypy --namespace-packages --package-root=. --package-root=a a/b/c.py d.py main.py
[file a/b/c.py]
[file d.py]
[file main.py]
import b.c
import d

[case testPackageRootMultiple2]
# cmd: mypy --package-root=a/ --package-root=./ a/b/c.py d.py main.py
# cmd: mypy --namespace-packages --package-root=a/ --package-root=./ a/b/c.py d.py main.py
[file a/b/c.py]
[file d.py]
[file main.py]
Expand Down

0 comments on commit d88a45c

Please sign in to comment.