Commit graph

232 commits

Author SHA1 Message Date
Guillaume Desmottes
d37ca29515 testsuite: remove cleanup
It's no longer used.
2020-01-07 18:16:51 +05:30
Olivier Crête
bc3e5b1206 test: Add test for the plugin loader
Fix #8
2020-01-07 10:42:36 +05:30
Philipp Zabel
6d53d0ae0e tests: Add buffer map/unmap tests 2019-12-09 21:03:19 +01:00
Tim-Philipp Müller
acb2da66f5 Remove autotools build 2019-10-14 19:08:47 +01:00
Thibault Saunier
42a27817bc suppr: Add a supression on wrong jump in python from fedora 30 2019-08-08 10:58:06 -04:00
Thibault Saunier
6fcd2c835f override Element before Bin so we can access element fields of bins
And add a test

See https://gitlab.gnome.org/GNOME/pygobject/issues/325
2019-05-06 11:30:47 -04:00
Tim-Philipp Müller
7b1dcdab58 Fix indentation of .c files
Required to make gst-indent linter on CI happy.
2018-12-15 13:55:07 +00:00
Mathieu Duponchelle
f79ac2d143 Tests: the sys.meta_path trick does not work for python2
Instead, for python2 revert to manipulating gi.overrides.__path__
2018-10-31 17:02:24 +01:00
Mathieu Duponchelle
d64bbc1e0c Tests: refactor testing approach
Instead of fiddling with sys.path, we instead use a custom
sys.meta_path importer
2018-10-31 00:41:31 +01:00
Havard Graff
af4ade3743 meson: use new python module
This patch makes the tests pass running uninstalled and installed, with
python2 and python3 on linux, windows and osx.

The main gist is to use the new python-module to do the lifting done
by pythondetector, and with that add support for python2 and windows.
2018-10-28 17:53:44 +01:00
Nicolas Dufresne
146b8cca43 makefiles: Add missing dist files
https://bugzilla.gnome.org/show_bug.cgi?id=793560
2018-02-22 17:05:35 -05:00
Thibault Saunier
693005716e bitmask: Do not use long() directly with python3
It doesn't exist anymore there
2018-02-22 08:05:54 -03:00
Sebastian Dröge
063562c986 Allow Bitmask to be created from ints and longs but always store as long
We need a 64 bit integer, and previously the test failed because it was
already created from longs in various cases (e.g. when reading from a
GstStructure).
2018-02-22 10:58:48 +01:00
Sebastian Dröge
2dd3bb0cb7 Ship meson build system in autotools generated tarballs 2018-01-23 19:32:18 +02:00
Thibault Saunier
fcbca025e3 Fix simply running testsuite in meson
- Make sure to never have root folder in sys.path when running meson,
  as pythondetector won't be able to access gi._overridesdir

- Generate a mesonconfig.py file that will be used by the testsuite to
  know where meson generated files, making `python -m unittest` working.
2017-07-26 15:27:21 -04:00
Thibault Saunier
cb0dd804f7 Add support for Gst.Bitmask 2017-07-26 15:27:21 -04:00
Thibault Saunier
fe222637a6 tests: Stop using deprecated assertion methods 2017-07-26 15:27:21 -04:00
Thibault Saunier
9845c91a5f tests: Move all Fundamental types tests in a file
No reason to have one file per type and it makes it more complicated
to handle.
2017-07-26 15:27:21 -04:00
Thibault Saunier
02ddaf29f9 structures: Override __new__ to make it more pythonic 2017-07-26 15:27:19 -04:00
Olivier Crête
24156b0b0d overrides: Remove IntRange And Int64Range on Python2
They use the range() built-in type which is a Python 3 change.

https://bugzilla.gnome.org/show_bug.cgi?id=782927
2017-05-21 18:08:36 +02:00
Nicolas Dufresne
d44975a1fe array/list: Make gvalue conversion symmetric
This is needed to support matrix. Otherwise, getting
a matrix would remove the rows envelopess, which would
make the "cast" fails, since it would not know if the
internal rows are ValueArray or ValueList. I think reading,
modifying and setting back the matrix is an important use
case.
2017-03-27 15:02:41 -04:00
Nicolas Dufresne
a4566ffbc8 overrides: Add more GstValue overrides
This patch adds overrides to support IntRange, Int64Range, DoubleRange,
FractionRange, Array and List. For integer ranges, it maps this
to python 'range'. Gst.IntRange() and Gst.Int64Range() are simple cast
to let the underlying code know which GType to use. To set such range in
python you will do:

  structure["range"] = Gst.IntRange(range(0,10,2)))

Same for the 64 bit variant. And when you do:

  r = structure.get_value("range")

A range will be returned directly, without the wrapper. For DoubleRange
and FractionRange, there is no native support in python. So the usage
will be:

  structure["range"] = Gst.DoubleRange(0,10.0)
  structure["range"] =
      Gst.FractionRange(Gst.Fraction(1/30), Gst.Fraction(1/5)

When getting this value, Gst.DoubleRange and Gst.FractionRange class are
returned. They both have start/stop members. The naming was taken from
range type.

For Array and List, both uses the native list type, though they can be
constructed from any python sequence. So again, the class is just like
a cast, to let it pick the right GType and python list are being
returned.

  structure["list"] = Gst.ValueList([1,2,3,4])
  structure["array"] = Gst.ValueArray([1,2,3,4)

Using string and tuple could also work. Since Gst.ValueList/Array are
sequence, you can convert one to the other with:

  list = Gst.ValueList([1,2,3,4])
  array = Gst.ValueArray (list)

https://bugzilla.gnome.org/show_bug.cgi?id=753754
2017-03-24 13:26:21 -04:00
Thibault Saunier
08d0d09fbd Play nicely with gst-build uninstalled
As overrides_hack is being used as user sitecustomize script
2016-11-04 11:40:10 -03:00
Thibault Saunier
490028ba21 meson: Add testsuite 2016-11-04 11:40:10 -03:00
Thibault Saunier
7b627c499d gst: Fix a crash when passing wrong type as __templates__ 2016-02-15 23:28:47 +01:00
Thibault Saunier
a4bbd96af1 Release 1.5.2 2015-06-24 17:44:30 +02:00
Thibault Saunier
ed1f9eccba tests: Fix tests in python2
Python2 core checks that the first argument of a method is of the type
of the object if it does not have any info about the method, so when
using Gst not initialized it raiser a TypeError and not a
Gst.NotInitialized as expected.

+ And fix a typo
2015-04-24 11:25:38 +02:00
Thibault Saunier
b80ea319cd tests: Add test_fraction back in the testsuite
Properly porting it and adding a small test about getting fraction
from a Gst.Structure
2015-04-24 11:21:44 +02:00
Thibault Saunier
d97662ad41 test: Bring back the testsuite and test if the initialization override works
Summary:
Simplify the Makefile taking example on pitivi and copy several pitivi
testing files, simplifying them a bit for our use case

Reviewers: Mathieu_Du

Differential Revision: http://phabricator.freedesktop.org/D97
2015-04-24 09:17:02 +02:00
Simon Farnsworth
c889037e40 Fix zip code of new FSF address
I missed the zip code last time round - fix it. Thanks to Michael Schwendt
in https://bugzilla.redhat.com/show_bug.cgi?id=1034341#c11 for pointing this
out to me.

Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>

https://bugzilla.gnome.org/show_bug.cgi?id=720317
2013-12-12 11:35:41 +00:00
Simon Farnsworth
2ad767a74c Update FSF address
The FSF has moved since these files were created. Update the address, in
order to keep packaging tools such as rpmlint quiet.

Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>

https://bugzilla.gnome.org/show_bug.cgi?id=715182
2013-11-26 15:28:53 +00:00
Thibault Saunier
a4b7a67f84 Keep only the testsuite as we are now using GObject Introspection for bindings 2012-07-30 16:24:10 -04:00
Andoni Morales Alastruey
8c60dc788e tests: fix checks when the locale is not the default one
Some tests (test_pbutils.py) checks against strings for the
english locale, so we should force it before running any test

https://bugzilla.gnome.org/show_bug.cgi?id=640207
2011-01-25 13:55:48 +00:00
Edward Hervey
21a885d462 testsuite: Add a make command to run tests forever
And will stop once they fail. Useful to debug racy tests.
2011-01-12 15:01:39 +01:00
Edward Hervey
fd6a936f24 test_pad: Fix pad refcount checking due to fix in core
The event source wasn't previously set correctly. Now that it is,
check the refcount on the proper pad.
2010-12-05 14:09:03 +01:00
Alessandro Decina
a1584d04c5 Fix distcheck some more.
In testsuite/common.py look for gst/__init__.py in builddir now.
Clean gst/__init__.pyc after make check.
2010-11-22 14:18:05 +01:00
Alessandro Decina
dc6b4f7a0a gst.Structure: raise TypeError when assigning None to a key 2010-08-06 23:18:02 +02:00
Alessandro Decina
92a1c11ed3 test_fraction: add a test for gobject property marshalling. 2010-07-26 19:42:39 +02:00
Alessandro Decina
56a725879d gst.GhostPad: allow set_target(None) to unset the target. Fixes #590735. 2010-07-14 12:35:35 +02:00
Thiago Santos
697c8e73f7 tag: Adds xmp functions mappings
Maps gst_tag_list_from_xmp_buffer and
gst_tag_list_to_xmp_buffer

https://bugzilla.gnome.org/show_bug.cgi?id=617068
2010-04-29 16:05:26 +02:00
Edward Hervey
886bcc9599 test_interface: Don't assert the missing mixer, gracefully ignore it
Fixes make check on systems that don't have a GstMixer element available
2010-04-29 16:02:20 +02:00
Sebastian Dröge
60e9fa42a1 build: Make some more rules silent if requested 2010-02-26 16:45:38 +01:00
Jan Schmidt
b0898556bb test: Fix the structure_changed message test
The core changed to use sink pads for the structure changed
message instead of source pads. Might as well fix the test too.
2009-09-11 22:41:28 +01:00
Edward Hervey
7c6041d479 Add test_audio.py. 2009-08-21 16:41:29 +02:00
Sebastian Dröge
aa92fc1bd7 Use LC_ALL=C for the tests as some are comparing localized strings
Fixes bug #590803.
2009-08-08 22:49:16 +02:00
Edward Hervey
7ad1b84f50 gst.Message: Wrap remaining parse_*() methods. 2009-07-01 13:54:57 +02:00
Edward Hervey
eb2aedc523 gst.Message: Add overrides for new 0.10.24 messages 2009-07-01 12:30:59 +02:00
Edward Hervey
f1bbb486ae gst.Event: Add override for step event 2009-07-01 12:30:40 +02:00
Thomas Vander Stichele
26fa6dd184 wrap gst_tag_to_vorbis_comment; fix uint tag setting
Setting gst.TAG_TRACK_NUMBER was failing because GStreamer
expects a uint while Python object -> GValue conversion was
giving an int.  gst_tag_to_vorbis_comment was wrapped so
this conversion could be tested and failed on properly.
2009-06-01 22:02:47 +02:00
Thomas Vander Stichele
88f3323bfe Convert unicode objects to utf-8 encoded G_STRINGs 2009-06-01 19:08:47 +02:00