Skip to content

Add a printer dry run command librocco-printer-test:#3

Open
ikusteu wants to merge 1 commit into
mainfrom
feature/print-test-script
Open

Add a printer dry run command librocco-printer-test:#3
ikusteu wants to merge 1 commit into
mainfrom
feature/print-test-script

Conversation

@ikusteu
Copy link
Copy Markdown
Contributor

@ikusteu ikusteu commented Sep 7, 2023

  • Prints out "Test receipt" string using DevPrinter (file)
  • In the future it should print a canned receipt using the actual printer

* Prints out "Test receipt" string using `DevPrinter` (file)
* In the future it should print a canned receipt using the actual printer
@ikusteu ikusteu requested a review from silviot September 7, 2023 14:08
@ikusteu
Copy link
Copy Markdown
Contributor Author

ikusteu commented Sep 7, 2023

I've named the function dry_run as it made sense. I was tempted to name it test, but I'm not all too familiar with Python's unit testing and didn't know if __name__ = "__test__" is already reserved...

@silviot
Please correct my understanding (__name__ is the function called by cli, is it??).

Also, please correct my module organisation, if this is not idiomatic: storing two cli commands in the cli.py

if __name__ == "__main__":
main()

if __name__ == "__dry_run__":
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this serves any purpose. it should be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants