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

Commit 764af4c

Browse files
committed
time_test.py generates 'package time'
1 parent 9dc9d03 commit 764af4c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/gentest

+2-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ def main(args):
8989

9090
imports = '\n\t'.join('_ "%s"' % _package_name(name) for name in names)
9191

92-
testfile_contents = template % (modname, imports)
92+
testfile_modname = modname[:-5] if modname.endswith('_test') else modname
93+
testfile_contents = template % (testfile_modname, imports)
9394
with open(os.path.join(mod_dir, 'module_test.go'), 'w') as go_testfile:
9495
go_testfile.write(testfile_contents)
9596

0 commit comments

Comments
 (0)