Skip to content

Commit a423091

Browse files
authored
test: Fix tests after templates update (#1040)
1 parent b61db41 commit a423091

3 files changed

Lines changed: 15 additions & 7 deletions

File tree

test/local/__fixtures__/commands/run/python/prints-error-message-on-project-with-no-detected-start.test.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,15 @@ describe('[python] prints error message on project with no detected start', () =
2323
beforeAll(async () => {
2424
await beforeAllCalls();
2525

26-
await testRunCommand(CreateCommand, { flags_template: 'python-start', args_actorName: actorName });
26+
await testRunCommand(CreateCommand, {
27+
flags_template: 'python-start',
28+
args_actorName: actorName,
29+
});
2730
toggleCwdBetweenFullAndParentPath();
2831

29-
// Remove src/ package and requirements.txt so there is no detectable Python package structure
30-
const srcFolder = joinPath('src');
31-
await rm(srcFolder, { recursive: true, force: true });
32+
// Remove my_actor/ package and requirements.txt so there is no detectable Python package structure
33+
const myActorFolder = joinPath('my_actor');
34+
await rm(myActorFolder, { recursive: true, force: true });
3235

3336
const requirementsTxt = joinPath('requirements.txt');
3437
await rm(requirementsTxt, { force: true });

test/local/__fixtures__/commands/run/python/works-with-spaces-in-path-to-actor.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,14 @@ describe('[python] spaces in path to actor', () => {
3030
beforeAll(async () => {
3131
await beforeAllCalls();
3232

33-
await testRunCommand(CreateCommand, { flags_template: 'python-start', args_actorName: actorName });
33+
await testRunCommand(CreateCommand, {
34+
flags_template: 'python-start',
35+
args_actorName: actorName,
36+
});
3437

3538
forceNewCwd(actorName);
3639

37-
await writeFile(joinCwdPath('src', 'main.py'), mainFile);
40+
await writeFile(joinCwdPath('my_actor', 'main.py'), mainFile);
3841

3942
outputPath = joinCwdPath(getLocalKeyValueStorePath(), 'OUTPUT');
4043
});

test/local/__fixtures__/python_support.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ async def main():
7070
await Actor.set_value('OUTPUT', ${JSON.stringify(expectedOutput)})
7171
`;
7272

73-
writeFileSync(joinPath('src', 'main.py'), actorCode, { flag: 'w' });
73+
writeFileSync(joinPath('my_actor', 'main.py'), actorCode, {
74+
flag: 'w',
75+
});
7476

7577
toggleCwdBetweenFullAndParentPath();
7678

0 commit comments

Comments
 (0)