Files
daily-journal-prompt/__pycache__/test_project.cpython-313.pyc

73 lines
12 KiB
Plaintext
Raw Normal View History

2026-01-02 15:13:03 -07:00
<EFBFBD>
6Xi\#<00><00>^<00>SrSSKrSSKrSSKrSSKJrJr SSKJr \RRS\RR\RR\ 555 Sr SrSrSrS rS
rS rS rS r\S:Xa#\"5r\R0"\(aSOS5 gg)z|
Test script for the Daily Journal Prompt Generator.
This script tests basic functionality without making actual API calls.
<EFBFBD>N)<02>Mock<63>patch)<01>datetimea {
"newprompt0": "Describe a place from your childhood that no longer exists. What made it special? What sounds, smells, and textures do you remember?",
"newprompt1": "Write a letter to your future self 10 years from now. What hopes, fears, and questions do you want to share?",
"newprompt2": "Imagine you wake up with a new superpower that only works on Tuesdays. What is it and how do you use it?",
"newprompt3": "Describe a meal that represents your cultural heritage. Who taught you to make it? What memories are tied to it?",
"newprompt4": "Write about a time you got lost, literally or metaphorically. What did you discover along the way?",
"newprompt5": "Create a dialogue between your current self and your teenage self. What would you talk about?"
}c<00><><00>[S5 /SQnSnUHIn[RRU5(a[SUS35 M8[SUS35 SnMK U$) zTest that required files exist.zTesting file structure...)<04> ds_prompt.txt<78>historic_prompts.json<6F>.envz example.envT<76> ✓ z exists<74> ✗ z missingF)<04>print<6E>os<6F>path<74>exists)<03>required_files<65> all_exist<73>files <20>test_project.py<70>test_file_structurerse<00><00> <09>
%<25>&<26><06>N<EFBFBD><15>I<EFBFBD><1E><04> <0A>7<EFBFBD>7<EFBFBD>><3E>><3E>$<24> <1F> <1F> <11>F<EFBFBD>4<EFBFBD>&<26><07>(<28> )<29> <11>F<EFBFBD>4<EFBFBD>&<26><08>)<29> *<2A><1D>I<EFBFBD> <1F> <15><14>c<00><><00>[S5 [SS5n[R"U5nSSS5 [ W[
5(a[S[ U5S35 g[S5 g !,(df  NH=f![Ran[S
U35 SnAg SnAf[a [S 5 g f=f) z.Test that historic_prompts.json is valid JSON.z
Testing JSON parsing...r<00>rNu4 ✓ historic_prompts.json is valid JSON (contains z prompts)Tu) ✗ historic_prompts.json is not a listFu/ ✗ historic_prompts.json is not valid JSON: u% ✗ historic_prompts.json not found) r <00>open<65>json<6F>load<61>
isinstance<EFBFBD>list<73>len<65>JSONDecodeError<6F>FileNotFoundError)<03>f<>data<74>es r<00>test_json_parsingr#1s<><00><00> <09>
%<25>&<26><15> <11>)<29>3<EFBFBD> /<2F>1<EFBFBD><17>9<EFBFBD>9<EFBFBD>Q<EFBFBD><<3C>D<EFBFBD>0<> <16>d<EFBFBD>D<EFBFBD> !<21> !<21> <11>H<><13>T<EFBFBD><19> <0B>S\<5C>]<5D> ^<5E><17> <11>=<3D> ><3E><18>0<> /<2F><> <10> <1F> <1F><15> <0A>?<3F><01>s<EFBFBD>C<>D<><14><> <1C><15> <0A>5<>6<><14><15>s9<00> B<00>A2<03>5B<00>& B<00>2
B<07><B<00>C<03>B*<03>*C<03>Cc<00> <00>[S5 [SS5nUR5nSSS5 [W5S:<3A>a<>[S[U5S35 /SQn/nUH8nUR 5UR 5;dM'UR U5 M: U(a[S S
R U535 g [S 5 g [S 5 g!,(df  N<>=f![a [S5 gf=f)z*Test that the prompt template is readable.z
Testing prompt template...rrNru! ✓ ds_prompt.txt is readable (<28> characters))z6 writing promptsz500 and 1000 charactersz
JSON arrayu ✓ Contains key phrases: <20>, u' ⚠ Missing some expected key phrasesTu ✗ ds_prompt.txt is emptyFu ✗ ds_prompt.txt not found)r r<00>readr<00>lower<65>append<6E>joinr)r <00>content<6E> key_phrases<65> found_phrases<65>phrases r<00>test_prompt_templater/Hs<><00><00> <09>
(<28>)<29><15> <11>/<2F>3<EFBFBD> '<27>1<EFBFBD><17>f<EFBFBD>f<EFBFBD>h<EFBFBD>G<EFBFBD>(<28> <0F>w<EFBFBD><<3C>!<21> <1B> <11>5<>c<EFBFBD>'<27>l<EFBFBD>^<5E><<3C>P<> Q<>Y<01>K<EFBFBD><1E>M<EFBFBD>%<25><06><19><<3C><<3C>><3E>W<EFBFBD>]<5D>]<5D>_<EFBFBD>4<>!<21>(<28>(<28><16>0<>&<26><1D><15>4<>T<EFBFBD>Y<EFBFBD>Y<EFBFBD>}<7D>5M<35>4N<34>O<>P<><18><16>?<3F>@<40><17> <11>0<> 1<><18>+(<28> '<27><>. <1D><15> <0A>-<2D>.<2E><14><15>s:<00> C+<00>C<03>AC+<00>9C+<00> C+<00> C+<00>
C(<07>$C+<00>+D<03>Dc <00><00>[S5 [R"[5n[ S5Vs/sHnSU3PM
nnUVs/sH o3U;dM
UPM nnU(a[SU35 g[S5 [S5 [ S5H7nUSU3n[ U5S:dM[S US
[ U5S 35 M9 g s snfs snf![R an[S U35 SnAgSnAff=f)z!Test parsing of mock AI response.z
Testing AI response parsing...<2E><00> newpromptu% ✗ Missing keys in mock response: Fu' ✓ Mock response parsed successfullyu% ✓ Contains all 6 expected prompts<74>2u ⚠ Prompt z is very short (r%Tu! ✗ Failed to parse mock JSON: N)r r<00>loads<64>MOCK_AI_RESPONSE<53>rangerr)r!<00>i<> expected_keys<79>key<65> missing_keys<79>promptr"s r<00>test_mock_ai_responser<is<><00><00> <09>
,<2C>-<2D><15><13>z<EFBFBD>z<EFBFBD>*<2A>+<2B><04>38<33><01>(<28>;<3B>(<28>Q<EFBFBD>9<EFBFBD>Q<EFBFBD>C<EFBFBD><1F>(<28> <0A>;<3B>'4<>H<>}<7D><03>4<EFBFBD><0F><03>}<7D> <0C>H<> <17> <11>9<>,<2C><1E>H<> I<><18> <0A>7<>9<> <0A>5<>7<><17>q<EFBFBD><18>A<EFBFBD><19>I<EFBFBD>a<EFBFBD>S<EFBFBD>/<2F>*<2A>F<EFBFBD><12>6<EFBFBD>{<7B>R<EFBFBD><1F><15> <0A>a<EFBFBD>S<EFBFBD>(8<><13>V<EFBFBD><1B> <0A>\<5C>R<>S<><1A>
<14><>!<<3C><>H<><48>" <10> <1F> <1F><15> <0A>1<>!<21><13>5<>6<><14><><15>sF<00>'C<00>C<04>C<00> C<04>C<04>C<00>49C<00>1C<00>
C<00>D<03>/D<03>Dc<00>J<00>[S5 [SS5nUR5nSSS5 SW;dSU;a/[S5 SU;dS U;a [S
5 g [S 5 g [S 5 g!,(df  NU=f![a [S5 gf=f)z'Test that environment file has API key.z
Testing environment file...r rNzDEEPSEEK_API_KEY=zOPENAI_API_KEY=u. ✓ .env file contains API key configurationzsk-your-actual-api-keyz sk-somethingu> ⚠ .env appears to contain example API key (needs real key)u* ✓ .env appears to contain real API keyTu( ✗ .env missing API key configurationFu ✗ .env file not found)r rr'r)r r+s r<00>test_environment_filer><00>s<><00><00> <09>
)<29>*<2A><15> <11>&<26>#<23> <1E>!<21><17>f<EFBFBD>f<EFBFBD>h<EFBFBD>G<EFBFBD><1F> <1F>'<27> )<29>-><3E>'<27>-I<> <11>B<> C<>(<28>7<EFBFBD>2<>n<EFBFBD><07>6O<36><15>V<>W<><18><16>B<>C<><17> <11><<3C> =<3D><18>!<1F> <1E><>$ <1D><15> <0A>)<29>*<2A><14><15>s3<00> B
<00>A9<03>6B
<00>! B
<00>- B
<00>9
B<07>B
<00>
B"<03>!B"c<00>f<00>[S5 [RRS5(a<>[ SS5nUR 5nSSS5 SS/n/nUHnUW;dM UR U5 M U(a[[SSRU535 UVs/sH oUU;dM
UPM nnU(a[S SRU535 g
[S 5 g [S5 g !,(df  N<>=fs snf![an[S U35 SnAg SnAff=f)z<Test that requirements.txt exists and has expected packages.z
Testing requirements file...zrequirements.txtrN<>openaiz python-dotenvu! ✓ requirements.txt contains: r&u ⚠ Missing packages: Tu0 ✗ requirements.txt missing expected packagesFu& ✗ Error reading requirements.txt: u ✗ requirements.txt not found) r r rrrr'r)r*<00> Exception)r r+<00>expected_packages<65>found_packages<65>package<67>p<>missingr"s r<00>test_requirements_filerG<00>s<00><00> <09>
*<2A>+<2B> <09>w<EFBFBD>w<EFBFBD>~<7E>~<7E>(<28>)<29>)<29> <19><15>(<28>#<23>.<2E>!<21><1B>&<26>&<26>(<28><07>/<2F>"*<2A>?<3F> ;<3B> <1D><1F>N<EFBFBD>,<2C><07><1A>g<EFBFBD>%<25>"<22>)<29>)<29>'<27>2<>-<2D><1E><15>9<>$<24>)<29>)<29>N<EFBFBD>:S<>9T<39>U<>V<>&7<>S<>&7<><11>N<EFBFBD>;R<>1<EFBFBD>&7<><07>S<><1A><19>4<>T<EFBFBD>Y<EFBFBD>Y<EFBFBD>w<EFBFBD>5G<35>4H<34>I<>J<><1B><15>H<>I<><1C> <0E>0<>1<><14>7/<2F>.<2E><>T<01><><19> <19> <11>:<3A>1<EFBFBD>#<23>><3E> ?<3F><18><> <19>sL<00> D<00>C8<03>D<00>)=D<00>& D <04>3D <04>9&D<00> D<00>8
D<07> D<00>
D0<03>D+<03>+D0c<00><><00>[S5 SS/nSnUHzn[RRU5(aB[ US5n[ UR 5US5 SSS5 [SUS 35 Mi[S
US35 S nM| U$!,(df  N6=f![an[S
US U35 S nSnAM<>SnAf[an[S USU35 S nSnAM<>SnAff=f)z1Test that Python scripts are syntactically valid.z
Testing Python scripts...zgenerate_prompts.pyzsimple_generate.pyTr<00>execNr
z is valid Pythonr z has syntax error: Fu ✗ Error testing <20>: z
not found) r r rrr<00>compiler'<00> SyntaxErrorrA)<05>scripts_to_test<73> all_valid<69>scriptr r"s r<00>test_python_scriptsrP<00>s<><00><00> <09>
'<27>(<28>,<2C>.B<>C<>O<EFBFBD><14>I<EFBFBD>!<21><06> <0A>7<EFBFBD>7<EFBFBD>><3E>><3E>&<26> !<21> !<21>
"<22><19>&<26>#<23>&<26>!<21><1B>A<EFBFBD>F<EFBFBD>F<EFBFBD>H<EFBFBD>f<EFBFBD>f<EFBFBD>5<>'<27><16><06>v<EFBFBD>h<EFBFBD>&6<>7<>8<> <12>F<EFBFBD>6<EFBFBD>(<28>*<2A>-<2D> .<2E><1D>I<EFBFBD>"<22>" <15><14>'<27>&<26><><1F> "<22><15><06>v<EFBFBD>h<EFBFBD>&9<>!<21><13>=<3D>><3E>!<21> <09><><1C> "<22><15>,<2C>V<EFBFBD>H<EFBFBD>B<EFBFBD>q<EFBFBD>c<EFBFBD>:<3A>;<3B>!<21> <09><> "<22>s;<00> B%<02>B<05>$B%<02>
B" <09>B%<02>%
C3<05>/C<05> C3<05>C.<05>.C3c<00><00>[S5 [S5 [S5 S[4S[4S[4S[4S[
4S[ 4S [4/n/nUHup#U"5nURX$45 M! [S5 [S5 [S5 [SU55n[U5nUH up$U(aSOSn[USU35 M" [SUSUS35 Xg:Xa;[S5 [S5 [S5 [S5 [S5 Xg:H$[SXv-
S35 Xg:H$![a0n[S
US U35 URUS 45 S nAGM#S nAff=f)zRun all tests.z<============================================================z+DAILY JOURNAL PROMPT GENERATOR - TEST SUITEzFile Structurez JSON ParsingzPrompt TemplatezMock AI ResponsezEnvironment FilezRequirements FilezPython Scriptsr z failed with exception: FNz=
============================================================z TEST SUMMARYc3<00><# <00>UHupU(dMSv<00> M g7f)<02>N<>)<03>.0<EFBFBD>_<>results r<00> <genexpr><3E>main.<locals>.<genexpr>s<00><00><00>6<>G<EFBFBD>y<EFBFBD>q<EFBFBD>v<EFBFBD><11><11>G<EFBFBD>s<00> <01> u✓ PASSu✗ FAILrJz
Total: <20>/z tests passedu3
✅ All tests passed! The project is ready to use.z
Next steps:z.1. Make sure your .env file has a real API keyz82. Install dependencies: pip install -r requirements.txtz03. Run: python generate_prompts.py --interactiveu
⚠ z- test(s) failed. Please fix the issues above.) r rr#r/r<r>rGrPr)rA<00>sumr) <09>tests<74>results<74> test_name<6D> test_funcrWr"<00>passed<65>total<61>statuss r<00>mainrc<00>s<><00><00> <09>&<26>M<EFBFBD> <09>
7<EFBFBD>8<> <09>&<26>M<EFBFBD>
<1A>.<2E>/<2F> <17>*<2A>+<2B> <1A>0<>1<> <1B>2<>3<> <1B>2<>3<> <1C>4<>5<> <19>.<2E>/<2F> <06>E<EFBFBD><11>G<EFBFBD> %<25><1C> <09> /<2F><1E>[<5B>F<EFBFBD> <13>N<EFBFBD>N<EFBFBD>I<EFBFBD>.<2E> /<2F>!&<26>
<EFBFBD>-<2D><18> <09>.<2E><19> <09>&<26>M<EFBFBD> <10>6<>G<EFBFBD>6<> 6<>F<EFBFBD> <0F><07>L<EFBFBD>E<EFBFBD>$<24><19> <09>%<25><1A>:<3A><06> <0A><16><08><02>9<EFBFBD>+<2B>&<26>'<27>%<25>
<EFBFBD>I<EFBFBD>f<EFBFBD>X<EFBFBD>Q<EFBFBD>u<EFBFBD>g<EFBFBD>]<5D>
3<EFBFBD>4<> <0A><EFBFBD> <0A>D<>E<> <0A>o<EFBFBD><1E> <0A>><3E>?<3F> <0A>H<>I<> <0A>@<40>A<> <12>?<3F><1A> <0E><06>u<EFBFBD>~<7E>&<26>&S<>T<>U<> <11>?<3F><1A><>7<19> /<2F> <11>F<EFBFBD>9<EFBFBD>+<2B>%=<3D>a<EFBFBD>S<EFBFBD>A<> B<> <13>N<EFBFBD>N<EFBFBD>I<EFBFBD>u<EFBFBD>-<2D> .<2E> .<2E><> /<2F>s<00>E<02>
F<05>$E<<05><F<05>__main__rS)<19>__doc__rr <00>sys<79> unittest.mockrrrr<00>insert<72>dirname<6D>abspath<74>__file__r5rr#r/r<r>rGrPrc<00>__name__<5F>success<73>exitrTrr<00><module>ros<><00><01><04>
 <0C> <09>
<EFBFBD>%<25><1D><04><08><08><0F><0F><01>2<EFBFBD>7<EFBFBD>7<EFBFBD>?<3F>?<3F>2<EFBFBD>7<EFBFBD>7<EFBFBD>?<3F>?<3F>8<EFBFBD>#<<3C>=<3D>><3E><05><10><15>,<15>.<15>B<15>@<15>8!<15>H<15>61<1B>h <0C>z<EFBFBD><19><12>f<EFBFBD>G<EFBFBD><07>H<EFBFBD>H<EFBFBD>'<27>Q<EFBFBD>q<EFBFBD>!<21>r