Skip to content
This repository was archived by the owner on Mar 23, 2023. It is now read-only.

Commit f6a8bf4

Browse files
committed
[HACK] Should suppress _test from package name
1 parent 764af4c commit f6a8bf4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tools/grumpc

+8
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,14 @@ def main(args):
9797
\t\tvar πE *πg.BaseException; _ = πE""")
9898

9999
go_package_name = args.modname.split('.')[-1]
100+
101+
# HACK: Should suppress _test from package name
102+
# See: https://github.com/google/grumpy/issues/383#issuecomment-353394740
103+
if go_package_name.endswith('_test'):
104+
final_package_name = go_package_name[:-5]
105+
else:
106+
final_package_name = go_package_name
107+
100108
modname = util.go_str(args.modname)
101109
writer.write_tmpl(tmpl, package=go_package_name,
102110
import_testing='import πt "testing"' if args.astest else '',

0 commit comments

Comments
 (0)