Skip to content
Snippets Groups Projects
  1. Sep 15, 2017
    • ulif's avatar
      Harden manpage test. · 86379bf4
      ulif authored
      The manpage test failed when tests were run in a long path. The help
      output then led to an extra line break which made comaparisons quite
      cumbersome.
      86379bf4
  2. Sep 14, 2017
  3. Aug 30, 2017
  4. Aug 28, 2017
    • drebs's avatar
      use function to get wordlists path · 07e497e5
      drebs authored
      The path to wordlist files is hardcoded in the generated sphinx
      documentation and because it may differ depending on how the package is
      installed this creates different problems:
      
        - the path hardcoded in the online api documentation may differ from
          the one in each installation, leading to incorrect information
          provided to the user of the api.
      
        - packaging diceware documentation to specific operating systems may
          generate unreproducible packages.
      
      This commit replaces the variable WORDLISTS_DIR by a function called
      get_wordlists_dir() that delays the construction of the path instead of
      doing it during module loading.
      07e497e5
  5. Jun 07, 2017
  6. Jun 04, 2017
  7. Jun 03, 2017
    • ulif's avatar
      Fix more tests. · e2f98db9
      ulif authored
      e2f98db9
    • ulif's avatar
      Fix test. · a5e8dc6b
      ulif authored
      We will not accept filedescriptors as `WordList` arguments anymore.
      a5e8dc6b
    • ulif's avatar
      Fix test. · effcbbd2
      ulif authored
      We will not accept filedescriptors as `WordList` arguments anymore.
      effcbbd2
  8. Jun 02, 2017
  9. May 31, 2017
    • ulif's avatar
      Remove obsolete test. · 59283682
      ulif authored
      We do not need to test `infile` as file descrtiptor, as we expect paths
      (strings) from now on.
      59283682
    • ulif's avatar
      Fix wordlist test. · d2ca804a
      ulif authored
      Do expect file paths instead of already opened filedescriptors.
      d2ca804a
  10. May 29, 2017
  11. May 23, 2017
  12. Apr 24, 2017
    • ulif's avatar
      Fix test for logger. · 5b7d3819
      ulif authored
      We did not yet set a defined level before testing loggers. Therefore
      results were unpredictable.
      5b7d3819
  13. Apr 20, 2017
    • ulif's avatar
      flake8. · 7a8405c6
      ulif authored
      7a8405c6
    • ulif's avatar
      Add basic tests for manpage. · db7a5430
      ulif authored
      We will check at least whether the man page is current and ensure that
      at least words from help output are mentioned in man page.
      db7a5430
  14. Mar 04, 2017
    • ulif's avatar
      Remove garbage. · e10a4ad3
      ulif authored
      e10a4ad3
    • ulif's avatar
      Print a hint when discarding rolls. · 6ddfc483
      ulif authored
      When using `realdice` randomness source and picking values out of short
      sequences (sequences shorter than the number of dice sides), we might
      require additional dice throws (if a value rolled is not in range of
      sequence length). We now print a hint when this happens.
      6ddfc483
  15. Mar 03, 2017
    • ulif's avatar
      Ensure equal distribution Fixes #35. · 17540205
      ulif authored
      We avoid the modulo operation now, if it comes to small sequences.
      Instead we discard invalud rolls and require new ones.
      17540205
    • ulif's avatar
      Expect roll nums following the old procedure. · 7f1bc4c5
      ulif authored
      In order to keep all entropy we could in case of sequence lengths
      unequal to powers of the number of dice sides just discard rolls and
      require further ones, until we get a number in the allowed range. But
      this could potentially require an endless number of rolls.
      
      Instead we implement the following policy:
      If R=log(<sequence_len>) with <number_of_dice_sides> as basis is >= 1,
      we require int(R) rolls. We will ignore elements in the sequence with
      index > int(R).
      
      Sample: For 6 dice sides and a sequence of 215 (= 6**3 - 1) elements R
      would be log_6(215) = 2.9975... but we would pick an element from the
      range [0..35], i.e. (6**2 - 1).
      
      If R is 0, we will require exactly one roll, if <sequence_length> is a
      divisor of <dice_sides>.
      
      In all other cases, <sequence_length> is not a divisor of <dice_sides>
      and <sequence_length> is shorter than the number of dice_sides. In this
      case we will roll dice until we get a result in [1..<sequence_length>].
      Other rolls will simply be discarded.
      7f1bc4c5
  16. Feb 27, 2017
  17. Feb 26, 2017
  18. Feb 25, 2017
  19. Feb 24, 2017
Loading