Commit graph

45 commits

Author SHA1 Message Date
Louis-Philippe Véronneau
2b66d0d97b Move test files into a 'tests' dir 2020-07-21 08:32:47 +02:00
jaseg
dae47345f7 tests: add tests for new wait_* API 2020-07-19 21:54:49 +02:00
jaseg
846f2a65ae Sprinkle some thread safety over event loop, add *wait_for_event 2020-07-18 14:21:31 +02:00
jaseg
759b9701c3 mpv.py: add wait_until_paused, wait_until_playing 2020-07-16 19:28:33 +02:00
jaseg
44ca94749a tests: rename test.srt to sub_test.srt to prevent auto-load 2020-07-16 15:01:23 +02:00
jaseg
d177064d12 tests: improve key binding tests with loopback test 2020-07-16 13:01:52 +02:00
jaseg
9c33d0117e tests: Fix test_log_handler for current master
The current mpv master changes default log output, breaking this test.
To be future-proof, it now emits its own message through the print-text
command.
2020-07-15 22:04:37 +02:00
jaseg
400053e8d3 tests: Fix TestLifecycle.test_options for current mpv master 2020-07-15 22:04:03 +02:00
jaseg
3fe42bfd9d tests: Fix test_instance_method_property_observer (#108)
The loop property was a poor choice here since setting it messes with
libmpv's event loop, leading to property change observer events being
dropped.
2020-07-15 22:04:03 +02:00
jaseg
f5a9690739 tests: Fix test_property_observer_decorator (#108) 2020-07-15 22:03:37 +02:00
jaseg
b54d5f5521 tests: Fix test_write for segaults in libmpv (#108) 2020-07-15 22:03:37 +02:00
jaseg
c3eef35f59 Fix handling of dashed options in loadfile.
Add tests based on --sub-file. Also add a test for sub_add here.
2020-07-12 13:27:53 +02:00
jaseg
068d034cc0 Make tests run headless using xvfbwrapper 2020-04-05 12:47:34 +02:00
jaseg
c7e0968d60 tests: Silence libmpv during unittests 2019-12-02 13:31:43 +01:00
jaseg
c7a50aec38 Fix Python 3.5 compatibility 2019-12-02 12:32:33 +01:00
jaseg
49e6f6f6d0 Add stream protocol handling
This allows you to directly feed bytes into mpv without going through a
file, FIFO etc. first. The new API is:

@player.register_stream_protocol(name)
@player.python_stream(name, size)
@player.python_stream_catchall

See their docstrings for their usage.
2019-12-01 21:25:04 +01:00
jaseg
35e69cd93e key bindings: Introduce key char parameter
Adapt key binding script message handling to be compatible with the new
key char parameter introduced upstream in
21f2468d67

This change is backwards-compatible. With older mpv versions this
parameter will be None.
2019-11-26 12:26:37 +01:00
jaseg
8f5f5c645b Fix MpvNode logic to use pröper unions
...instead of lots manual ctypes pointer casting
2017-12-24 22:43:13 +01:00
jaseg
2ca5c7b9c8 Add on_key_press 2017-08-21 15:36:03 +02:00
jaseg
7f929b09fe Fix key binding registration for bound methods, add unit tests 2017-08-20 23:37:18 +02:00
jaseg
13191bfeb9 mpv, mpv-test: Fix vim mode lines 2017-08-06 22:28:01 +02:00
jaseg
cc84e4939b Re-nerf property observer tests 2017-08-06 21:32:17 +02:00
jaseg
0ed8403171 mpv-test.py: Add more thorough property tests 2017-08-06 21:16:23 +02:00
jaseg
1582390031 Move to fully FORMAT_NODE-based API
This will break lots of stuff.
* Use MPV_FORMAT_NODE mostly everywhere
* Dynamically discover properties instead of using a static list
* Modify encoding handling to be more versatile
2017-08-03 12:36:21 +02:00
jaseg
e0591798f2 Fixes for libmpv v0.26.0 2017-08-03 00:53:27 +02:00
jaseg
3b6a29b8ae tests: Add test for multi-valued property-mapped options 2017-07-03 22:22:03 +02:00
jaseg
a80f638732 Make compatible with libmpv 0.22.0 2017-07-03 13:13:50 +02:00
jaseg
34ab0392c8 Fix racy property tests 2017-07-03 12:24:44 +02:00
jaseg
36404a2a40 Add regression test for #26 2017-05-26 14:07:06 +02:00
jaseg
11f534897c mpv-test: Fix some tests, add property observer decorator test
Also fix ass-style-override
2017-05-26 14:02:24 +02:00
Matt Deacalion Stevens
b1f81ac561
Fix unobserve_property RuntimeError 2017-05-21 10:58:36 +01:00
jaseg
c47bd2a2c6 BREAKING: Move property observation API to NODE format 2017-05-10 18:29:41 +02:00
jaseg
303eedbb3b Add documentation and polish handler registration 2017-05-10 14:05:10 +02:00
jaseg
d2ffe25700 Update properties for current upstream master 2017-05-10 11:56:00 +02:00
jaseg
eb8b6a05d7 Clarify event thread handling in the README 2016-11-23 10:20:49 +01:00
jaseg
b71e8a4a55 Small refactoring of with usage in tests 2016-08-24 11:42:17 +02:00
jaseg
1ee4361bdd Pimp loadfile to accept per-file options 2016-08-20 11:20:20 +02:00
jaseg
669c4bbfec BREAKING 💥 Improve property handling 2016-08-20 09:54:53 +02:00
jaseg
ab8b8b5477 Improve event handling, add message handling, add key binding foo 2016-08-17 23:21:19 +02:00
jaseg
de7b671103 Finally add node handling, fix ALL THE THINGS
* New node handling
 * Add remaining properties
 * Improve property type handling (no more ynbool!)
 * Add pröper option access
 * Add a whole bunch of tests
2016-08-13 19:14:14 +02:00
jaseg
4d6c17d342 WIP 2016-08-13 18:19:39 +02:00
jaseg
97d929e27f Add loads of new properties 2016-08-13 01:30:03 +02:00
jaseg
a8be9bd534 More tests 2016-08-13 01:29:35 +02:00
jaseg
588d74938c Make video-pan-x and video-pan-y floats as they should be 2016-08-04 16:23:44 +02:00
jaseg
f3cab6cdf1 Add tests 2016-02-19 15:34:34 +01:00