110 Commits

Author SHA1 Message Date
Marcin Kulik
37153a6740 Fix reading of asciicasts v1 and v2 having null env values in header 2025-10-23 17:05:19 +02:00
Marcin Kulik
a76b54c61b New integration tests 2025-09-01 17:48:36 +02:00
Marcin Kulik
b0eeb2f84e Rename test fixtures 2025-08-31 21:36:55 +02:00
Marcin Kulik
1eda16b912 Remove old tests for Python impl 2025-08-31 21:33:19 +02:00
Marcin Kulik
dd6b9a3008 Fix loading of asciicast v1 2025-05-06 18:09:01 +02:00
Marcin Kulik
3c1de97251 Add test for loading asciicast v3 2025-05-03 15:58:52 +02:00
Marcin Kulik
07af5ec3f0 Test for timestamp 2025-05-03 15:44:22 +02:00
Marcin Kulik
bf52290514 Capture terminal color palette
This uses OSC sequence to query the colors from the terminal, and saves
them as a theme in asciicast v2 header
(https://docs.asciinema.org/manual/asciicast/v2/#theme).
2024-02-12 15:49:35 +01:00
Marcin Kulik
3f9ffd0254 Fix parsing of round numbers in deserialize_time 2024-01-23 21:53:24 +01:00
Marcin Kulik
d73790ff2e Add missing test cast file 2024-01-23 21:07:51 +01:00
Marcin Kulik
c0ec1ac758 Support for opening v1 asciicasts 2024-01-23 14:30:05 +01:00
Marcin Kulik
06e2f3278f Bye bye Python implementation! 2023-12-20 16:55:38 +01:00
Marcin Kulik
2902529a45 Rename breakpoints to markers 2023-05-05 10:55:00 +02:00
Marcin Kulik
bac2ce47e9 Fix integration test hanging on Debian and Ubuntu 2023-04-28 09:29:54 +02:00
Marcin Kulik
3c308f413a Add integration test for breakpoints 2023-04-26 16:08:13 +02:00
Marcin Kulik
0ba83391ef Fix stdin recording (broken during pty refactor) 2022-05-07 16:30:49 +02:00
Marcin Kulik
607bcb4bb0 Try integration test for stdin recording with whoami instead of who 2022-05-07 16:26:21 +02:00
Marcin Kulik
badc93bfb8 Re-enable integration test for recording program that exits immediately 2022-05-07 15:58:04 +02:00
Davis Schirmer
7a90a30ba5 [typing] Annotate tests 2022-02-21 18:39:26 -05:00
Marcin Kulik
ed017ee41f Less defensive programming, rename test mock class 2022-02-18 21:42:20 +01:00
Marcin Kulik
fd09df89f6 Option to override cols/rows of the recorded process
This adds `--cols <n>` / `--rows <n>` options to `rec` command. This disables
autodection of terminal size, and reports fake fixed number of columns/rows to
the recorded process.
2022-02-17 21:54:30 +01:00
Davis Schirmer
d7c5794b1e [tests] Add trailing newline to demo.json 2022-02-13 17:19:12 -05:00
Davis Schirmer
4ef8d32fc9 Revert "[tests:distros] Update Fedora 34 => 35"
This reverts commit 5546d7b0e6.

The fix for the default Docker seccomp profile containing the clone()
syscall wrapper from glibc 2.34 does not appear to be in the GitHub
Actions `ubuntu-latest` virtual environment yet.

* https://github.com/actions/virtual-environments
* https://github.com/actions/virtual-environments/blob/releases/ubuntu20/20220207/images/linux/Ubuntu2004-Readme.md
2022-02-13 16:17:38 -05:00
Davis Schirmer
5546d7b0e6 [tests:distros] Update Fedora 34 => 35
https://bugs.launchpad.net/ubuntu/+source/docker.io/+bug/1938908/comments/101
2022-02-13 13:43:55 -05:00
Davis Schirmer
2127a69e45 [tests:distros] Update Alpine 3.14 => 3.15
https://alpinelinux.org/posts/Alpine-3.15.0-released.html
2022-02-13 13:43:54 -05:00
Davis Schirmer
59376ece05 Revert "[test] Drop support for Python 3.6; upgrade CentOS"
This reverts commit ab1fbb0c96.
2021-11-05 01:20:16 -04:00
Davis Schirmer
209ee86f47 [test] Format test_helper 2021-11-05 01:15:27 -04:00
Davis Schirmer
205d247dc4 [test] Format v2 test 2021-11-05 01:15:26 -04:00
Davis Schirmer
ab1fbb0c96 [test] Drop support for Python 3.6; upgrade CentOS
PEP 563: _Postponed Evaluation of Annotations_ was introduced as
__future__.annotations in Python 3.7. Since future imports are required
to be unconditional, this import fails on Python 3.6. This import
supports more complete type hinting, esepecially for class methods.
Since Ubuntu 18.04 and CentOS 7 are the last major distros to still ship
Python 3.6, drop support.
2021-11-05 01:14:06 -04:00
Davis Schirmer
3eae623092 [test] Update test for asciinema.pty_ 2021-11-05 01:14:05 -04:00
Davis Schirmer
66534d258d [ci] Run container integration tests to CI 2021-11-05 01:13:57 -04:00
Davis Schirmer
bd3e6f5f67 [test] Convert unittests runner nose => pytest
Per the official docs, nose is in maintenance mode. Attempts to import
`Callable` from `collections` fails in Python 3.10. Convert
nose-specific assert statements to bare asserts supported by pytest.

* https://nose.readthedocs.io/en/latest/#note-to-users
* https://github.com/pytest-dev/nose2pytest
2021-11-05 01:13:56 -04:00
Davis Schirmer
dcf4f3f9ca [test] Update test distro Dockerfiles
* Add Dockerfile.{alpine,arch}
* Add test.distros Makefile target
2021-11-05 01:13:55 -04:00
Davis Schirmer
9eab5f5cb7 [container] Update Dockerfile for PEP 518 build 2021-11-05 01:13:54 -04:00
Davis Schirmer
07b29ee2b5 [test] Fix imports in tests/config_test.py 2021-11-05 01:13:52 -04:00
Davis Schirmer
a89cc2d6f9 [test] Shellcheck tests/*.sh 2021-10-30 14:02:27 -04:00
Marcin Kulik
bc793d541c Custom notification command + disabling notifications 2019-09-08 11:30:46 +02:00
Marcin Kulik
8aecc1d558 Let pty recorder report elapsed time 2019-03-23 12:26:20 +01:00
Marcin Kulik
7b9c8298b4 Fix pycodestyle (pep8) errors 2018-12-08 19:02:13 +01:00
Marcin Kulik
20b8565708 Refactor recording 2018-11-25 18:30:44 +01:00
Marcin Kulik
7fa2cdc62f Fix new test under python < 3.6 2018-03-04 10:42:58 +01:00
Marcin Kulik
8f7d2fd149 Move incremental utf-8 decoding from async_writer to writer 2018-03-03 20:03:02 +01:00
Marcin Kulik
331dcf497f Keep UUID out of config file and call it "install ID"
We referred to this locally generated UUID as "API token" which was wrong,
because it doesn't have any special API powers, and is only used to link local
machine with uploaded recordings, so they can later be associated with
asciinema.org account.

It's more of device token or installation ID in nature, so let's call it
"install ID" for short, and keep it at ~/.config/asciinema/install-id.

Keeping it in automatically created config file also turned out to be not the
best idea - the config was mixing user preferences with local, device specific
state, preventing easy publishing of the config (for example in a public
dotfiles repository).
2017-12-04 00:25:50 +01:00
Marcin Kulik
1e5e20b213 Add test for quickly exiting process (disabled for now) 2017-12-02 19:07:12 +01:00
Marcin Kulik
f517ee92b1 Tweak test output 2017-12-02 19:00:53 +01:00
Marcin Kulik
7418b7240d Script for running integration tests on multiple distros via Docker 2017-12-02 18:40:09 +01:00
Marcin Kulik
418ee5a8a5 Check for pkill command before running integration tests 2017-12-02 18:39:25 +01:00
Marcin Kulik
6365bf62e3 Add integration test for appending 2017-12-02 17:57:32 +01:00
Marcin Kulik
d8fab1e74d Add asciinema cat command 2017-11-18 16:57:13 +01:00
Marcin Kulik
551fbc765d Fix cleanup of tmp dir after test run 2017-11-18 16:22:24 +01:00