Batuhan Taskaya
f3b500119c
Implement basic metrics layout & total elapsed time ( #1250 )
...
* Initial metadata processing
* Dynamic coloring and other stuff
* Use -vv / --meta
* More testing
* Cleanup
* Tweek message
Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
2021-12-23 12:13:25 -08:00
Mickaël Schoentgen
c6cbc7dfa5
Uniformize UTF-8 naming ( #1115 )
...
* Uniformize UTF-8 naming
Replace `utf8` -> `utf-8` everywhere.
It should have no impact, `utf8` is an alias of `utf-8` [1].
[1] ee03bad25e/Lib/encodings/aliases.py (L534)
* Always specify the encoding
Let's be explicit over implicit. And prevent future warnings from PEP-597 [1].
[1] https://www.python.org/dev/peps/pep-0597/#using-the-default-encoding-is-a-common-mistake
* Update `UTF8` constant (`utf-8` -> `utf_8`)
* Remove default argument from `str.encode()` and `bytes.decode()`
* Clean-up
2021-08-05 20:58:43 +02:00
Mickaël Schoentgen
2f8d7f77bd
Add more download tests ( #1114 )
2021-07-26 20:27:36 +02:00
Mickaël Schoentgen
a3a08a9a22
Use relative imports ( #1057 )
...
* Use relative imports in test
* Use relative imports
* Add myself to contributors :)
2021-05-05 14:13:39 +02:00
Mickaël Schoentgen
1274d869f6
Replace usage of mock with unittest.mock ( #1054 )
...
Since Python 3, the mock dependency is no more required as
it is already part of the unittest module.
2021-04-30 15:08:27 +02:00
Jan Verbeek
84c7327057
Correctly handle single-byte Content-Range ( #1032 )
...
HTTPie previously failed if it continued a download with a single byte left.
2021-02-14 13:30:58 +01:00
Shubhendra Singh Chauhan
9883a46575
Cleanup ( #993 )
2020-12-21 12:03:25 +01:00
Jakub Roztocil
1aa1366f99
Finish --quiet
2020-08-15 15:26:29 +02:00
Nicolas Beltran
2c7f24e3e5
Added additional tests to verify downloads work properly with quiet flag
2020-08-15 15:26:29 +02:00
Nicolas Beltran
69e1067a2c
Aesthetic changes
2020-08-15 15:26:29 +02:00
Nicolas Beltran
7e38f9ccf0
Added additional tests for flag and better documentation
2020-08-15 15:26:29 +02:00
Nicolas Beltran
4bd2e622a5
Added tests for --quiet flag
2020-08-15 15:26:29 +02:00
Jakub Roztocil
bece3c77bb
Add one-by-one processing of each HTTP request or response and --offline
2019-09-03 17:14:39 +02:00
Jakub Roztocil
0f654388fc
Python 3 annotations, super(), pathlib, etc.
2019-08-30 15:14:51 +02:00
Jakub Roztocil
b3d2c1876e
Python 2.7 support removal WIP
2019-08-29 08:53:56 +02:00
Jakub Roztocil
df36d6255d
Changed the way the output filename is generated
...
When ``--download`` without ``--output`` results in a redirect,
now only the initial URL is considered, not the final one.
2019-06-24 12:20:09 +02:00
Mickaël Schoentgen
3a46149de1
Fix several ResourceWarning: unclosed file ( #741 )
...
Signed-off-by: Mickaël Schoentgen <contact@tiger-222.fr>
2019-02-04 10:00:30 +01:00
Jakub Roztocil
11be041e06
Rename TestEnvironment
to MockEnvironment
to avoid pytest warnings
...
Close #621
2017-12-28 18:17:48 +01:00
Jakub Roztocil
5300b0b490
Fixed #451 - OSError: [Errno 36] File name too long
2016-03-17 15:58:01 +08:00
Jakub Roztocil
a6ebc44a48
Run tests against both HTTP and HTTPS
...
Some of the tests now use the `httpbin_both` fixture from pytest-httpbin.
Also, made httpbin's CA trusted by default and added `httpbin_secure_untrusted`
fixture to allow overriding that for particular tests.
2016-03-06 17:42:35 +08:00
Jakub Roztocil
ed08ab133e
Refactoring
2016-02-29 15:00:17 +08:00
Jakub Roztocil
2a72ae23d5
Run tests against local httpbin instance via pytest-httpbin.
2014-06-28 16:38:41 +02:00
Jakub Roztocil
2aa53e4be3
Avoid “__init__.py” files in test directories.
...
As recommended here:
https://pytest.org/latest/goodpractises.html
2014-04-28 11:29:41 +02:00
Jakub Roztocil
af4aa3a761
Test improvements.
2014-04-25 12:18:35 +02:00
Jakub Roztocil
27faf06327
Removed last dependencies on unittest. All tests are pytest-only.
2014-04-25 11:39:59 +02:00
Jakub Roztocil
887f70f595
Added CONTRIBUTING.rst.
2014-04-24 19:32:55 +02:00
Jakub Roztocil
3d079942f4
Finished pytest migration.
2014-04-24 19:32:55 +02:00
Jakub Roztocil
3cb124bba7
Cleanup
...
XX
2014-04-24 19:32:50 +02:00
Jakub Roztocil
b880e996d0
Converted all unittest asserts to plain, pytest-powered asserts.
2014-04-24 14:58:15 +02:00
Jakub Roztocil
6071fff4af
Refactored tests into smaller modules.
2014-04-24 14:07:31 +02:00