<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Testing on Ashlynn Antrobus</title><link>https://ashlynnantrobus.dev/tags/testing/</link><description>Recent content in Testing on Ashlynn Antrobus</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 26 Aug 2024 23:01:24 +0000</lastBuildDate><atom:link href="https://ashlynnantrobus.dev/tags/testing/index.xml" rel="self" type="application/rss+xml"/><item><title>Unit Testing Difficulty is an Indicator of (Low) Code Quality</title><link>https://ashlynnantrobus.dev/posts/unit-testing-difficulty-is-an-indicator-of-low-code-quality/</link><pubDate>Mon, 26 Aug 2024 23:01:24 +0000</pubDate><guid>https://ashlynnantrobus.dev/posts/unit-testing-difficulty-is-an-indicator-of-low-code-quality/</guid><description>&lt;p&gt;When I first read about unit testing, I’ll admit, it sounded like one of those things that only seasoned developers would bother with. It seemed like a maze of confusing terms and intimidating processes that only experts could navigate.  I didn’t write my first test for over a year after I started my coding journey. Until then, my version of testing was typing &lt;code&gt;python my\_project.py&lt;/code&gt; in the terminal. Or, I will sheepishly admit, just hitting the “Run” button in VS Code (and Replit before that). Then waiting for it to crash and debugging from there. It was my version of compiled languages developers who claim that if the code compiles, it must be free of errors.&lt;/p&gt;</description></item><item><title>Back to the __future__ and import annotations</title><link>https://ashlynnantrobus.dev/posts/back-to-the-__future__-and-import-annotations/</link><pubDate>Sun, 30 Jun 2024 22:56:25 +0000</pubDate><guid>https://ashlynnantrobus.dev/posts/back-to-the-__future__-and-import-annotations/</guid><description>&lt;p&gt;After last week, I thought I was done with module import errors. Turns out, I had only just started with them.&lt;/p&gt;&#10;&lt;p&gt;After months of hard work, I have finally written all of the code for my LoreBinders project. Now to see if it works!&lt;/p&gt;&#10;&lt;p&gt;So I wrote tests for everything, typed &lt;code&gt;pytest&lt;/code&gt; into the terminal and hit enter.&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;ImportError while importing test module &amp;#39;vscode\ProsePal\lorebinders\tests\test_ai_factory.py&amp;#39;.&#10;Hint: make sure your test modules/packages have valid Python names.&#10;Traceback:&#10; from lorebinders._managers import EmailManager, RateLimitManager&#10;src\lorebinders\_managers.py:4: in &#10;from _types import AIModelRegistry, APIProvider, Model, ModelFamily&#10;src\lorebinders_types.py:12: in&#10;from _managers import AIProviderManager, EmailManager, ErrorManager&#10;src\lorebinders_managers.py:4: in&#10;from _types import AIModelRegistry, APIProvider, Model, ModelFamily&#10;E ImportError: cannot import name &amp;#39;AIModelRegistry&amp;#39; from partially initialized module &amp;#39;_types&amp;#39; (most likely due to a circular import)&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;15 times. Different modules, same problem.&lt;/p&gt;</description></item></channel></rss>