Skip to content
Snippets Groups Projects
Select Git revision
  • 6b937e9c7d437221be4bcd683ea3cda8947f11d2
  • master default protected
  • 0.19.X
  • discrete
  • 0.18.X
  • ignore_lambda_to_diff_errors
  • 0.17.X
  • authors-update
  • 0.16.X
  • 0.15.X
  • 0.14.X
  • debian
  • 0.13.X
  • 0.12.X
  • 0.11.X
  • 0.10.X
  • 0.9.X
  • 0.6.X
  • 0.7.X
  • 0.8.X
  • 0.19.1
  • 0.19.0
  • 0.19b2
  • 0.19b1
  • 0.19-branching
  • 0.18.2
  • 0.18.1
  • 0.18
  • 0.18rc2
  • 0.18rc1
  • 0.18rc
  • 0.17.1-1
  • 0.17.1
  • debian/0.17.0-4
  • debian/0.17.0-3
  • debian/0.17.0-1
  • 0.17
  • debian/0.17.0_b1+git14-g4e6829c-1
  • debian/0.17.0_b1-1
  • 0.17b1
40 results

linear.py

Blame
  • assert_tests.py 448 B
    # ==============
    # File: assert_tests.py
    # By: Jack Holdsworth - 20023933
    # Use: Using the assert function to test morse.py
    # Written on: Python 3.8
    # ==============
    import morse
    
    def test_encode_us():
        assert morse.encode('us') == '..- ...', "Should be ..- ..."
    
    def test_decode_us():
        assert morse.decode('..- ...') == 'US', "Should be us"
    
    if __name__ == "__main__":
        test_encode_us()
        test_decode_us()
        print('Everything passed')