Create python file with random names for testing refactoring#966
Conversation
Codecov Report
@@ Coverage Diff @@
## master #966 +/- ##
==========================================
- Coverage 64.02% 64.01% -0.01%
==========================================
Files 260 260
Lines 12027 12027
Branches 2130 2130
==========================================
- Hits 7700 7699 -1
- Misses 4318 4319 +1
Partials 9 9
Continue to review full report at Codecov.
|
ericsnowcurrently
left a comment
There was a problem hiding this comment.
LGTM
The duplicated code makes me want to suggest factoring a common base or fixture to share. However, I'll resist. :)
| PythonSettings.dispose(); | ||
| } | ||
|
|
||
| export async function wait(timeoutMilliseconds: number) { |
There was a problem hiding this comment.
hurray for ripping out code! :)
| const EXTENSION_DIR = path.join(__dirname, '..', '..', '..'); | ||
| const refactorSourceFile = path.join(__dirname, '..', '..', '..', 'src', 'test', 'pythonFiles', 'refactoring', 'standAlone', 'refactor.py'); | ||
| const refactorTargetFile = path.join(__dirname, '..', '..', '..', 'out', 'test', 'pythonFiles', 'refactoring', 'standAlone', 'refactor.py'); | ||
| const refactorTargetFileDir = path.join(__dirname, '..', '..', '..', 'out', 'test', 'pythonFiles', 'refactoring', 'standAlone'); |
| await wait(500); | ||
| fs.unlinkSync(refactorTargetFile); | ||
| } | ||
| initializeDI(); |
There was a problem hiding this comment.
Why once per test rather than once per suite?
There was a problem hiding this comment.
Each test needs it's own setup,
There was a problem hiding this comment.
Things could change during the test run, changes in the environment
Fixes #964