v0.4.1
- Fixed
MockInstallation
to emulate workspace-global setup (#69). In this release, theMockInstallation
class in theinstallation
module has been updated to better replicate a workspace-global setup, enhancing testing and development accuracy. Theis_global
method now utilizes theproduct
method instead of_product
, and a new instance variable_is_global
with a default value ofTrue
is introduced in the__init__
method. Moreover, a newproduct
method is included, which consistently returns the string "mock". These enhancements resolve issue #69, "FixedMockInstallation
to emulate workspace-global setup", ensuring theMockInstallation
instance behaves as a global installation, facilitating precise and reliable testing and development for our software engineering team. - Improved
MockPrompts
withextend()
method (#68). In this release, we've added anextend()
method to theMockPrompts
class in our library's TUI module. This new method allows developers to add new patterns and corresponding answers to the existing list of questions and answers in aMockPrompts
object. The added patterns are compiled as regular expressions and the questions and answers list is sorted by the length of the regular expression patterns in descending order. This feature is particularly useful for writing tests where prompt answers need to be changed, as it enables better control and customization of prompt responses during testing. By extending the list of questions and answers, you can handle additional prompts without modifying the existing ones, resulting in more organized and maintainable test code. If a prompt hasn't been mocked, attempting to ask a question with it will raise aValueError
with an appropriate error message. - Use Hatch v1.9.4 to as build machine requirement (#70). The Hatch package version for the build machine requirement has been updated from 1.7.0 to 1.9.4 in this change. This update streamlines the Hatch setup and version management, removing the specific installation step and listing
hatch
directly in the required field. The pre-setup command now only includes "hatch env create". Additionally, the acceptance tool version has been updated to ensure consistent project building and testing with the specified Hatch version. This change is implemented in the acceptance workflow file and the version of the acceptance tool used by the sandbox. This update ensures that the project can utilize the latest features and bug fixes available in Hatch 1.9.4, improving the reliability and efficiency of the build process. This change is part of the resolution of issue #70.
Contributors: @nfx, @pritishpai