<commit_before>%%% @author <NAME>
%%% @copyright © 2013 <NAME> https://github.com/apauley/erlcdt/blob/master/LICENSE.md
%%% @doc
%%% Helper functions used by test the test suites.
%%%
%%% This code is part of the "Erlang Concrete Data Types" library:
%%% https://github.com/apauley/erlcdt
%%% @end
%%% Created : 29 Sep 2013 by <NAME>

-module(erlcdt_testhelper).

-export([proper_options/0,
         proper_options/2]).

-define(DEFAULT_PROPER_OPTS, [{numtests,2000},{to_file, user}]).
-define(TRAVIS_PROPER_OPTS,  [{numtests,5000},{to_file, user}]).

-type property() :: {Key :: any(), Value :: any()}.
-type proplist() :: list(property()).

-spec proper_options() -> proplist().
proper_options() ->
  proper_options(?DEFAULT_PROPER_OPTS, ?TRAVIS_PROPER_OPTS).

-spec proper_options(proplist(), proplist()) -> proplist().
proper_options(DefaultOptions, TravisOptions) ->
  proper_options(DefaultOptions, TravisOptions, is_running_on_travis()).

proper_options(_DefaultOptions, TravisOptions, _OnTravis=true) ->
  TravisOptions;
proper_options(DefaultOptions, _TravisOptions, _OnTravis=false) ->
  DefaultOptions.

is_running_on_travis() ->
  is_list(os:getenv("TRAVIS_OTP_RELEASE")).
<commit_msg>Reduce the number of proper tests in Travis. It times out.<commit_after>%%% @author <NAME>
%%% @copyright © 2013 <NAME> https://github.com/apauley/erlcdt/blob/master/LICENSE.md
%%% @doc
%%% Helper functions used by test the test suites.
%%%
%%% This code is part of the "Erlang Concrete Data Types" library:
%%% https://github.com/apauley/erlcdt
%%% @end
%%% Created : 29 Sep 2013 by <NAME>

-module(erlcdt_testhelper).

-export([proper_options/0,
         proper_options/2]).

-define(DEFAULT_PROPER_OPTS, [{numtests,2000},{to_file, user}]).
-define(TRAVIS_PROPER_OPTS,  [{numtests,2000},{to_file, user}]).

-type property() :: {Key :: any(), Value :: any()}.
-type proplist() :: list(property()).

-spec proper_options() -> proplist().
proper_options() ->
  proper_options(?DEFAULT_PROPER_OPTS, ?TRAVIS_PROPER_OPTS).

-spec proper_options(proplist(), proplist()) -> proplist().
proper_options(DefaultOptions, TravisOptions) ->
  proper_options(DefaultOptions, TravisOptions, is_running_on_travis()).

proper_options(_DefaultOptions, TravisOptions, _OnTravis=true) ->
  TravisOptions;
proper_options(DefaultOptions, _TravisOptions, _OnTravis=false) ->
  DefaultOptions.

is_running_on_travis() ->
  is_list(os:getenv("TRAVIS_OTP_RELEASE")).

{'fraction_non_alphanumeric': 0.16564165641656417, 'fraction_numerical': 0.016400164001640016, 'mean_word_length': 5.873239436619718, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 23, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3483933', 'n_tokens_mistral': 910, 'n_tokens_neox': 850, 'n_words': 168}