2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-04-28 05:26:47 +00:00

File name is apparently important...

This commit is contained in:
Oliver Walters 2022-05-21 20:24:31 +10:00
parent 12828e47f9
commit 31325f4893
3 changed files with 5 additions and 6 deletions

View File

@ -1,2 +0,0 @@
[run]
source = ./lib

2
.gitignore vendored
View File

@ -12,7 +12,7 @@
coverage/* coverage/*
# This file is auto-generated as part of the CI process # This file is auto-generated as part of the CI process
test/test_touch_files.dart test/coverage_helper_test.dart
# Sentry API key # Sentry API key
lib/dsn.dart lib/dsn.dart

View File

@ -5,7 +5,7 @@ and generates a 'test' file which includes all these files.
This is to ensure that *all* .dart files are included in test coverage. This is to ensure that *all* .dart files are included in test coverage.
By default, source files which are not touched by the unit tests are not included! By default, source files which are not touched by the unit tests are not included!
Ref: https://github.com/flutter/flutter/issues/27997#issue-410722816 Ref: https://github.com/flutter/flutter/issues/27997
""" """
from pathlib import Path from pathlib import Path
@ -14,7 +14,7 @@ if __name__ == '__main__':
dart_files = Path('lib').rglob('*.dart') dart_files = Path('lib').rglob('*.dart')
with open("test/test_touch_files.dart", "w") as f: with open("test/coverage_helper_test.dart", "w") as f:
f.write("// ignore_for_file: unused_import\n\n") f.write("// ignore_for_file: unused_import\n\n")
@ -29,7 +29,8 @@ if __name__ == '__main__':
f.write("// DO NOT EDIT THIS FILE - it has been auto-generated by 'find_dart_files.py'\n") f.write("// DO NOT EDIT THIS FILE - it has been auto-generated by 'find_dart_files.py'\n")
f.write("// It has been created to ensure that *all* source file are included in coverage data\n") f.write("// It has been created to ensure that *all* source file are included in coverage data\n")
f.write("// Reference: https://github.com/flutter/flutter/issues/27997#issue-410722816\n\n")
f.write('import "package:test/test.dart";\n\n');
f.write("// Do not actually test anything!\n") f.write("// Do not actually test anything!\n")
f.write("void main() {}\n") f.write("void main() {}\n")