<commit_before>from __future__ import absolute_import
import unittest
import numpy as np
from sunpy.coords import diff_rot
#pylint: disable=C0103,R0904,W0201,W0212,W0232,E1103

class DiffRotTest(unittest.TestCase):
    """ Please note the numbers in these tests are not checked for physical
    accuracy, only that they are the values the function was outputting upon
    implementation. """
    
    def test_single(self):
        rot = diff_rot(10, 30)
        self.failUnless(rot == 136.8216)
        
    def test_array(self):
        rot = diff_rot(10, np.linspace(-70, 70, 2))
        self.failUnless(np.array_equal(rot, np.array([110.2725,  110.2725])))
        
    def test_synodic(self):
        rot = diff_rot(10, 30, rot_type='howard', frame_time='synodic')
        self.failUnless(rot == 126.9656)
        
    def test_sidereal(self):
        rot = diff_rot(10, 30, rot_type='howard', frame_time='sidereal')
        self.failUnless(rot == 136.8216)
        
    def test_howard(self):
        rot = diff_rot(10, 30, rot_type='howard')
        self.failUnless(rot == 136.8216)
 
    def test_allen(self):
        rot = diff_rot(10, 30, rot_type='allen')
        self.failUnless(rot == 136.9)
    
    def test_snodgrass(self):
        rot = diff_rot(10, 30, rot_type='snodgrass')
        self.failUnless(rot == 135.4232)
    
    def test_fail(self):
        self.assertRaises(ValueError, diff_rot, 10, 30, rot_type='garbage')<commit_msg>Fix tests<commit_after>from __future__ import absolute_import
import unittest
import numpy as np
from sunpy.physics.transforms.differential_rotation import diff_rot
#pylint: disable=C0103,R0904,W0201,W0212,W0232,E1103

class DiffRotTest(unittest.TestCase):
    """ Please note the numbers in these tests are not checked for physical
    accuracy, only that they are the values the function was outputting upon
    implementation. """
    
    def test_single(self):
        rot = diff_rot(10, 30)
        self.failUnless(rot == 136.8216)
        
    def test_array(self):
        rot = diff_rot(10, np.linspace(-70, 70, 2))
        self.failUnless(np.array_equal(rot, np.array([110.2725,  110.2725])))
        
    def test_synodic(self):
        rot = diff_rot(10, 30, rot_type='howard', frame_time='synodic')
        self.failUnless(rot == 126.9656)
        
    def test_sidereal(self):
        rot = diff_rot(10, 30, rot_type='howard', frame_time='sidereal')
        self.failUnless(rot == 136.8216)
        
    def test_howard(self):
        rot = diff_rot(10, 30, rot_type='howard')
        self.failUnless(rot == 136.8216)
 
    def test_allen(self):
        rot = diff_rot(10, 30, rot_type='allen')
        self.failUnless(rot == 136.9)
    
    def test_snodgrass(self):
        rot = diff_rot(10, 30, rot_type='snodgrass')
        self.failUnless(rot == 135.4232)
    
    def test_fail(self):
        self.assertRaises(ValueError, diff_rot, 10, 30, rot_type='garbage')

{'fraction_non_alphanumeric': 0.11728605523354926, 'fraction_numerical': 0.07637231503579953, 'mean_word_length': 2.9918367346938775, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '3225967', 'n_tokens_mistral': 1166, 'n_tokens_neox': 992, 'n_words': 218}