Commit Graph
7 Commits
Author SHA1 Message Date
dustinfaceandGitHub 5844c6cda2 tests: Avoid using match of pytest.raises together with paths (#11638) 2022-05-26 15:15:30 -07:00
Kyle AltendorfandGitHub 12ec1a2b3e add tests.util.misc.assert_maximum_duration for benchmark assertions (#11589)
* add tests.util.misc.assert_maximum_duration for benchmark assertions

* fix some imports

* more

* lint

* correct duration

* hint fixup

* rename to caller_file_and_line()

* set default timer to thread_time()

* extract gc manager and default to disabling

* self calibrate overhead

* wrap none-ness behind .results() method

* add messages

* from __future__ import annotations

* yield out self

* final from typing_extensions

* split it

* just use Future

* tweak

* tweak

* correction in loosely hint checked file

* all future indexing in hints

* union for the hints

* rename

* assert_runtime()

* another rename...

* message -> label

* label all results with test names

* oops
2022-05-23 12:50:48 -07:00
Kyle AltendorfandGitHub f9226fb60d rename test files that are missing test_ prefix (#10712)
* rename test files that are missing test_ prefix

* update mypy and isort excludes

* skip test_get_host_addr6() in GitHub Actions under macOS

* rebuild workflows
2022-05-16 09:51:00 -07:00
Nikolaj KuntnerandGitHub 0b3124821f bytes formatting simplify (#6021)
* init

* Add dash in README

* add more test cases

* whitespace around ==

* explicit return

* add another large test case
2021-05-26 11:11:44 -07:00
Ruslan SkorbandGitHub 9e21716965 Add format_bytes(bytes:) function to convert bytes to human readable string. (#5449) 2021-05-24 22:14:29 -07:00
Richard KissandGene Hoffman 569ca16f50 Use sed to change imports from src to chia. 2021-04-04 21:41:39 -07:00
dustinfaceandGitHub 6a1862fbc8 src|test: Improve time estimate in cmds.farm_funcs.summary() (#1528)
* util|test: Add misc.py with format_minutes as first method

Format `minutes` into a string with the format:

`unit` and `sub-unit`

where `unit` and `sub-unit` can be:
- years (`unit` only)
- months
- weeks
- days
- hours
- minutes

* cmds: Use `format_minutes` in farm_funcs.summary
2021-03-27 00:18:19 -07:00