예제 #1
0
    def test_po(self):
        '''Test Po'''
        planet = Planet()
        for atm in '2345':
            for hyd in '0123':
                planet.atmosphere = ehex(atm)
                planet.hydrographics = ehex(hyd)
                planet._determine_trade_codes()

                self.assertTrue('Po' in planet.trade_codes)
예제 #2
0
    def test_not_po(self):
        '''Test !Po'''
        planet = Planet()
        for atm in '016789ABC':
            for hyd in '456789A':
                planet.atmosphere = ehex(atm)
                planet.hydrographics = ehex(hyd)
                planet._determine_trade_codes()

                self.assertFalse('Po' in planet.trade_codes)
예제 #3
0
    def test_not_in(self):
        '''Test !In'''
        planet = Planet()
        for atm in '3568ABC':
            for pop in '012345678':
                planet.atmosphere = ehex(atm)
                planet.population = ehex(pop)
                planet._determine_trade_codes()

                self.assertFalse('In' in planet.trade_codes)
예제 #4
0
    def test_in(self):
        '''Test In'''
        planet = Planet()
        for atm in '012479':
            for pop in '9A':
                planet.atmosphere = ehex(atm)
                planet.population = ehex(pop)
                planet._determine_trade_codes()

                self.assertTrue('In' in planet.trade_codes)
예제 #5
0
    def test_not_ag(self):
        '''Test !Ag'''
        planet = Planet()
        for atm in '0123ABC':
            for hyd in '01239A':
                for pop in '0123489A':
                    planet.atmosphere = ehex(atm)
                    planet.hydrographics = ehex(hyd)
                    planet.population = ehex(pop)
                    planet._determine_trade_codes()

                    self.assertFalse('Ag' in planet.trade_codes)
예제 #6
0
    def test_ag(self):
        '''Test Ag'''
        planet = Planet()
        for atm in '456789':
            for hyd in '45678':
                for pop in '567':
                    planet.atmosphere = ehex(atm)
                    planet.hydrographics = ehex(hyd)
                    planet.population = ehex(pop)
                    planet._determine_trade_codes()

                    self.assertTrue('Ag' in planet.trade_codes)
예제 #7
0
    def test_not_ri(self):
        '''Test !Ri'''
        planet = Planet()
        for gov in '0123ABC':
            for atm in '01234579ABC':
                for pop in '0123459A':
                    planet.government = ehex(gov)
                    planet.atmosphere = ehex(atm)
                    planet.population = ehex(pop)
                    planet._determine_trade_codes()

                    self.assertFalse('Ri' in planet.trade_codes)
예제 #8
0
    def test_ri(self):
        '''Test Ri'''
        planet = Planet()
        for gov in '456789':
            for atm in '68':
                for pop in '678':
                    planet.government = ehex(gov)
                    planet.atmosphere = ehex(atm)
                    planet.population = ehex(pop)
                    planet._determine_trade_codes()

                    self.assertTrue('Ri' in planet.trade_codes)
예제 #9
0
    def test_na(self):
        '''Test Na'''
        planet = Planet()
        for atm in '0123':
            for hyd in '0123':
                for pop in '6789':
                    planet.atmosphere = ehex(atm)
                    planet.hydrographics = ehex(hyd)
                    planet.population = ehex(pop)
                    planet._determine_trade_codes()

                    self.assertTrue('Na' in planet.trade_codes)