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

fix test directory migration #27885

Merged
merged 2 commits into from
Oct 14, 2020

Conversation

pangyoki
Copy link
Contributor

@pangyoki pangyoki commented Oct 13, 2020

PR types

Others

PR changes

Others

Describe

Unittest file test_directory_migration.py is used to test the correction of module path in PR #25898 .
To test the new path of modules, it will write all the new modules into a file and then run it.
Because all the modules are tested at the same time, it can't find which module occurs error.
This PR is used to position the specific module that occurs error.

The following list is the modules that needs to be checked, they will be writed into a file and be checked in order.

屏幕快照 2020-10-15 下午3 15 15

For example, if module paddle.to_tensor is deleted.
Before this PR, the error message is

image

It gives the wrong error message that Can't import Module paddle.static.nn.embedding.
Because all the modules are tested at the same time. No matter which module occurs error, only the last module paddle.static.nn.embedding will be reported as a problem.

After we position the specific module in this PR, the error message is

image

It can clearly tell users that cannot import name 'to_tensor'.

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@zhiqiu zhiqiu merged commit 6e5034e into PaddlePaddle:develop Oct 14, 2020
chen-zhiyu pushed a commit to chen-zhiyu/Paddle that referenced this pull request Oct 15, 2020
* fix test directory migration

* change assert to self.assertXXX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants